jq key assignment is not working.
I tried what was here for my use case. Using jq how can I replace the name of a key with something else
in this case I want to change id
to item_id`.
jq '.item[] | select(.closed == false) | select(.id == "1234") | .["id"] = .["item_id"] | .' data.json | less
the result does not error but "id" gets a value of null
and there is not key called item_id
. so there is something I am not getting right about assignment of the key.