I want to rename nested json key and keep under same schema.
Input:"properties": {"name": "Ram","age": "17","department": "Sony" }Code : jq '[.["properties.company"] = .properties.department| del(.properties.department)]' fileOutput:
"properties": {"name": "Ram","age": "17" }"properties.company" = "Sony"Expected Output should be :
"properties": {"name": "Ram","age": "17","company": "Sony" }What I am doing wrong ?