You can wrap the results from select
in an array:
jq '[.[]|select(.a=="x")][0]' your.json
Output:
{
"a": "x",
"b": false
}
You can wrap the results from select
in an array:
jq '[.[]|select(.a=="x")][0]' your.json
Output:
{
"a": "x",
"b": false
}