I would like to transform with jq this JSON
[
{
"one": 37,
"two": "2017-09-15T19:31:55"
}
]
to this one
[
{
"one": 37
},
{
"two": "2017-09-15T19:31:55"
}
]
How to do it?
Thank you
When it comes to manipulations involving the keys of JSON objects, to_entries (and its friend, with_entries) are your friends:
map(to_entries[] | {(.key): .value})
Note also the parentheses around .key.