This example uses the add action to introduce a new property to the object describing a resultsPerPage option. When you deploy this customization, the JSONPath query searches for the resultsPerPage.items property whose value is 12 per page. This example modification then adds newProperty to the array.
Copy
{
"type": "object",
"modifications" : [
{
"target": "$.properties.resultsPerPage.default[?(@.items == 12)]",
"action": "add",
"value": {"newProperty" : "new property value"}
}
]
}
After deploying this modification, the code in the configurationManifest.json looks like this:
Copy
...
"default": [
{
"items": 12,
"name": "Show $(0) products per page",
"newProperty" : "new property value"
},
...