Json Processing Cookbook

Json Processing Cookbook

Flatten Json #

jq -r '. | tostream
| select(length==2)
| (.[0] | join(".")) as $k
| .[1] as $v
| "\"\($k)\" = \"\($v)\";"'