Issue
I wanted to change this value
{
"data":"correctValue",
"attributes": [
{
"otherValue": "incorrectValue"
}
]
}
to
{
"data":"correctValue"
}
Solution
Or, if instead of deleting the attributes you want to keep .data
, you can do:
jq '{data: .data}' input-file
Answered By - William Pursell Answer Checked By - Mildred Charles (WPSolving Admin)