Select & transform
Keep matching objects
select emits its input only when the condition is truthy.
.users[] | select(.active)Input and expected output
Input
{"users":[{"name":"Ada","active":true},{"name":"Linus","active":false}]}Expected output
{
"name": "Ada",
"active": true
}