Quantcast
Channel: [Q&A - FAQ Neotys] Last questions
Viewing all articles
Browse latest Browse all 2283

Extracting values from JSON response depending on another value

$
0
0

Hello
I'm attempting to extract a value from a JSON response depending on the content of another value. For example I have the following:

"examplevalues" : [ {
"id" : "id2",
"Type" : "type2,
}, {
"id" : "id1",
"Type" : "type1",
}, {
"id" : "id4",
"Type" : "type4",
}, {
"id" : "id3",
"Type" : "type3",
}]

I want to extract the value for "id" where the corresponding Type is "type4". The variables can appear in any order and there could be more or fewer number of values than the example 4 shown.

Thanks
Raj.


Viewing all articles
Browse latest Browse all 2283

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>