The JSON I want to parse looks like this:
{
"results": [
[
{
"field": "@logStream",
"value": "i-0d41c4f2b294fae88-messages"
},
{
"field": "@ptr",
"value": "CmEKJgoiMTI1NzEwNTIwMzE3OkRhdGFJbmdlc3QtZW50ZXJwcmlzZRAHEjUaGAIGPjW1igAAAACsKl4NAAY/k4KwAAAAoiABKIzAjqzoMDC5+ZGs6DA4D0DrEEi4C1DlBxgAEA4YAQ=="
}
]
],
"statistics": {
"recordsMatched": 94761,
"recordsScanned": 94761,
"bytesScanned": 13659575
},
"status": "Complete"
}
From each sublist in the results
list, I want the value of value
for every field
that equals @logStream
.
How can this be achieved?
The closest I've been able to come to even getting anything that distinguishes field
values is this:
results[].[field==`@logStream`]
But that only gives booleans:
[
[
true
],
[
false
]
]
What I'd like to get is this, or something like it:
[
[
{
"value": "i-0d41c4f2b294fae88-messages"
}
]
]
I also tried
results[].[field==`@logStream`].value
and
results[].[field==`@logStream`].[value]
but those only gave me [ null ]
and null
.