robocop-json-postprocess (265B)
1 #!/bin/sh 2 # This script is in the public domain. 3 # It removes empty arrays, objects and null values from the JSON data structure it is given. 4 exec jq 'walk(if type == "object" then with_entries(select(.value != [] and .value != {} and .value != null)) else . end)'