Remove blank element from json 2019/05/25 | Programming/ JSON | JSON Remove blank element from json12345678910111213141516$ cat ~/.jqdef remove_empty: . | walk( if type == "object" then with_entries( select( .value != null and .value != "" and .value != [] and .value != {} ) ) else . end );