In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to use the json extractor to extract multiple parameter values at one time", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use the json extractor to extract multiple parameter values at a time" bar!
Json extractor extracts multiple values
The above is the response data. I need to extract both of these parameters and pass them to the request of the next interface, and add the json extractor.
About the parameters of json extractor:
Names of created variables: the name of the variable that receives the value. Multiple variables are separated by semicolons.
Json path:json path expressions, also separated by semicolons
Match no:0 is random; n takes the matching value;-1 matches all, and subsequent references take the Nth value with the variable name _ N.
Default values: the default value, which is taken when the value does not match
Above we can see that variables, expressions, and default values are separated by semicolons, so that they can be passed to the next interface!
Check whether the request data is the return value of the previous API:
If we need to match multiple parameters in the array, how should we extract it?
If we want to extract all the id from the interface and pass it to the next interface according to the situation we need, we can first debug it with jsonpath:
As you can see above, the jsonpath expression is $.data [*] .id, get all the id in the data of the corresponding data, and then pass it to the next id corresponding to the next API according to our needs:
Suppose we need the id of the second post in the array, then the input parameters of the next interface can be written as follows
Id2 represents the second, and {id_1} represents the first. Take the value according to the subscript. Similarly, we need different values of different parameters in the array, which can be combined with the values of the above parameters. The json extractor can write:
Thank you for your reading, the above is the content of "how to use json extractor to extract multiple parameter values at one time". After the study of this article, I believe you have a deeper understanding of the problem of how to use json extractor to extract multiple parameter values at one time. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.