Given something like the following JSON:
{
"pageId": 2,
"page_title": "My page",
"order": 1,
"active": true,
"layout": null,
"unitId": 1,
"mediaContainers": [
]
},
What is the proper way to add an item to the mediaContainers
array using the JSON Patch notation? I've tried
{
"op": "add",
"path": "/mediaContainers/-",
"value": {
"type": "video",
"mediaContainerVideos": []
}
}
and
{
"op": "add",
"path": "/mediaContainers/0",
"value": {
"type": "video",
"mediaContainerVideos": []
}
}
with no success, which makes sense now since this array is empty. From what I've seen in the spec, all the examples deal with non-empty arrays, so I'm at a bit of a loss here.