I want to modify the value of all x keys in a json that looks like:
{
"a": {
"b": {
"c": [
{
"0": {
"x": 23,
"name": "AS"
}
},
{
"1": {
"x": 23,
"name": "AS"
}
},
{
"2": {
"x": 23,
"name": "Fe"
}
},
{
"3": {
"x": 23,
"name": "Pl"
}
}
]
}
}
}
I have tried multiple approaches, but I can't modify the value of x and obtain the full json as a result. All I managed to do is modify the value of x and obtain the last array as a result.
Here is the closest I have been to achieve the result: https://jqplay.org/s/Wx741btZOg