jq -cr 'keys[] as $k | "\($k)\n\(.[$k])"' input.json | while read -r key ; do read -r item printf "%s\n" "$item" > "/tmp/$key.json" done
jq, json, shell — Apr 11, 2022