Select non-null fields jq
Filter array elements where value is not null
jq '[.[] | select(.value != null)]' data.json
more jq
all 17 commands →
Group by field
jq 'group_by(.status) | map({status: .[0].status, count: length})' data.json
Flatten nested array
jq 'flatten(1)' nested.json
Convert array to object (index_by)
jq 'INDEX(.[]; .id)' items.json
Merge two objects
jq -s '.[0] * .[1]' base.json override.json
Extract nested value safely
jq '.config?.database?.host // "localhost"' config.json