Obtaining an Array via Reverse Index
Function Name
$getReverseItem(StringA, intB)
Parameter Description
- StringA: array or list element path of the response body or response header.
- intB: subscript of the array in reverse order. 0 indicates the last array, and 2 indicates the last but one array.
Function Description
Obtains an array from a response body or header based on the reverse index.
Application Scenarios
The built-in function for obtaining arrays during response extraction based on the reverse index can be used for API automation.
Example
As shown in the following figure, the property value of the response body parameter item is the function for obtaining arrays via reverse Index. Parameter A in the function is the response body property result, and parameter B is 0.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot