I am having trouble deleting all empty arrays from a JSON file with jq
.
I've tried:
walk(if type == "array" then map(select(length > 0)) else . end)
which removes empty strings, but the arrays stay in the document. Is there a way to remove the arrays completely? Thank you for your support.