How to work with direct json data using yq commands #1249
Unanswered
dnyaneshwarjadhav
asked this question in
Q&A
Replies: 2 comments
-
I'm not sure what you mean by 'store json data into variable' - what's the result you want? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Do you mean the yaml string is in a variable instead of
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am having json file
sample.yaml
{"cat": "meow"}
Following query works
yq '.a' sample.yml
But If I want to store json data into variable then how to perform query ?
$ yq '. | length' "a: cat"
Error: open a: cat: The system cannot find the path specified.
Beta Was this translation helpful? Give feedback.
All reactions