I have json data from curl like this:
[
{
"state": "foo",
},
{
"state": "foo",
},
{
"state": "foo",
}
]
output of curl uri | jq .[].state would be
"foo"
"foo"
"foo"
How can I check with jq if all the "state" values are equal and use this true or false status next in my condition? in this example I would get true value.
but here
"foo"
"foo"
"bar"
should be false