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

How to check if element exists in array with jq

$
0
0

I have an array and I need to check if elements exists in that array or to get that element from the array using jq, fruit.json:

{"fruit": ["apple", "orange","pomegranate","apricot","mango"    ]}cat fruit.json | jq '.fruit .apple'

does not work


Viewing all articles
Browse latest Browse all 657

Trending Articles



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