I have an object which has an array of objects. I am willing to append two properties of each object inside the array and create a new key out of that. I am new to JQ and have tried various ways to do this, but not able to figure out. Need help.
Input:
{
"name": "Toyota",
"Model": "Innova",
"Details": [
{
"entry_day": "23",
"entry_month": "May"
},
{
"entry_day": "01",
"entry_month": "Jan"
}
]
}
Output I expect:
{
"name": "Toyota",
"Model": "Innova",
"Details": [
{
"entry_date": "23 May"
},
{
"entry_date": "01 Jan"
}
]
}
JanandMayshould be in double quotes