Let’s say you have got a JSON construction that appears like this:
{ “xyz”: { “a”: “abc”, “b”: “bcd” } }
You’re making an attempt to get the worth of a.
You wrote code like this:
echo $json | jq xyz.a
As a substitute write it like this with the dot in entrance which represents the beginning of your json:
echo '.xyz.a'
Teri Radichel — Comply with me @teriradichel on Twitter
© 2nd Sight Lab 2022
____________________________________________
About this weblog:
Wish to be taught extra about Cybersecurity and Cloud Safety? Try: Cybersecurity for Executives within the Age of Cloud on Amazon
Want Cloud Safety Coaching? 2nd Sight Lab Cloud Safety Coaching
Is your cloud safe? Rent 2nd Sight Lab for a penetration check or safety evaluation.
Have a Cybersecurity or Cloud Safety Query? Ask Teri Radichel by scheduling a name with IANS Analysis.
Cybersecurity & Cloud Safety Assets by Teri Radichel: Cybersecurity and Cloud safety lessons, articles, white papers, shows, and podcasts