I have a JSON response that looks like this:
[
{
"@level": "info",
"@message": "Text"
},
{
"@level": "error",
"@message": "Text"
},
{
"@level": "info",
"@message": "Text"
}
]
How can I filter the JSON response to only show Objects where "@level" === "error"
. I am aware how to generally filter JSON arrays in JS (e.g. as described here). However, this solution does not work if the key contains a special character like @
.
What am I missing here?