
Announcements
HI,
I'm accessing data from an API, I can do get and put just fine,
The get looks like this
[{
"id": 1,
"summary": "Support1",
"Flag": false,
"Fields": [
{
"id": 2,
"value": "Something here"
},{
"id": 32,
"value": "Something Here"
}]
},{
"id": 2,
"summary": "Support2",
"Flag": true,
"Fields": [{
"id": 2,
"value": "Something here"
},{
"id": 32,
"value": "Something Here"
}]
}]
When I do a patch I successfully point it at the right record and can update the 'root' values, flag for example, but for the life of me I can't work out how to patch the nested element, say the 'value' of the Fields item 32.
[{
"op": "replace",
"path": "/Fields[2].value",
"value": "Something new"
}]
Anyone able to assist?
Hi @AdamPlevin
did you tried like below
{
"id": 2,
"summary": "Support2",
"Flag": true,
"Fields": [{
"id": 2,
"value": "Something here"
},{
"id": 32,
"value": "updated value"
}]
See whether this works ?
Nived N 🚀
LinkedIn: Nived N's LinkedIn
YouTube: Nived N's YouTube Channel
Blog: Nived Nambiar's Blogs
🔍 Found my answer helpful? Please consider marking it as the solution!
Your appreciation keeps me motivated. Thank you! 🙌