Reputation: 95
I have a json output with dozens of entries following this format:
{
"a": {
"1": {
"c": "text1"
},
dozens more ...
"999": {
"c": "text99"
}
}
}
I want the "c" value for each Something like: ".a.*.c" Any suggestions?
Upvotes: 3
Views: 1253
Reputation: 116900
.a | .[] | .c
which can be abbreviated as:
.a[].c
If you wanted the value of all keys named "c", no matter where they occur:
.. | .c? // empty
Upvotes: 4