I am struggling to use jq
to massage the input data so that the first level keys are preserved, while the lower level JSON gets converted to escaped strings.
Input JSON:
{"a": "1","b": {"c": "2","d": {"e": "3" } },"f": "4"}
Desired output:
{"a": "1","b": "{ \"c\": \"2\", \"d\": { \"e\": \"3\"} }","f": "4"}
Is there a "pure"jq
solution to this?