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

How to check if an attribute exists in a json using jq?

$
0
0

Hi I am having a shell script ,the shell script has a variable named RESPONSE

I want a to check if the json object has an attribute named "address" is present. Also how to get value of the attribute address . I want to use jq library

#!/bin/bashRESPONSE={"content-length":"2","address":"192.168.123.1","path":"/hello-world"}

appreciate any help


Viewing all articles
Browse latest Browse all 608

Trending Articles



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