Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 657

Select object from list where value is elsewhere in the JSON

$
0
0

Let's say I have a bit of JSON that looks like this

{"fish": [        {"name": "pike","version": 1        },        {"name": "haddock","version": 2        }    ],"current_fish_version": 2}

And I wanted to get the name of the fish with the version equal to current_fish_version.

How would I go about doing that?


Viewing all articles
Browse latest Browse all 657

Trending Articles



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