So, say I have this JSON...
[
{
"a": "1",
"blah": "true"
},
{
"b": "2",
"blah": "false"
},
{
"c": "3",
"blah": "true"
}
]
...and then use jq to select certain entries...
jq '.[] | select(.blah=="true)'
I get this...
{
"a": "1",
"blah": "true"
}
{
"c": "3",
"blah": "true"
}
But I want it to look like...
[
{
"a": "1",
"blah": "true"
}
{
"c": "3",
"blah": "true"
}
]
...this, so that I can use indexing to get certain of these entries. How do I do that?