Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {"success": true, "results": {"a": …, "b": …, "c": …}}
- {"success": true, "results": {"b": …}}
- $ jq 'del(select(.results.b | not))'
- {"success": true, "results": {"a": …, "b": …, "c": …}}
- # removes nothing from "results"
- $ jq 'with_entries(select(.key == "success" or .key == "results.b"))
- {"success": true}
- # nested comparison not understood; returns only "success"
Add Comment
Please, Sign In to add comment