Using jq how can I replace the key name with something else
This should be simple enough ... I want to rename multiple keys (ideally with jq), whatever I do seems to be a bug. Here is a json example below:
[
{
"fruit": "strawberry",
"veg": "apple",
"worker": "gardener"
}
]
I would like to rename the veg key to fruit2 (or whatever one may say), as well as the working key to work.
I understand that this is possible in Sed, but I am trying to deal with JQ
+11
source to share