I'm trying to filter simple JSON data and export keys with similar values using the JMESPath query. This is my JSON.
{
"af": "0",
"al": "2",
"dz": "0",
"ad": "2",
"ao": "1",
"ag": "2",
"ar": "2",
"am": "2",
"au": "3",
"at": "2"
}
Desired output would be this if I specify "0"
{
"af",
"dz"
}
My current query is keys(@)[?contains(@, '0')]
but it returns empty array.