Suppose I have a json like this:
{
"records": [
{
"id": 1,
"name": "hello"
},
{
"id": 2,
"name": "world"
}
]
}
I could do this:
$ jq -r '.records[] | "id: \(.id) name: \(.name)"' afile.json
id: 1 name: hello
id: 2 name: world
How can I insert new lines so that I could get this:
id: 1
name: hello
id: 2
name: world