updateJSON

Update a value in a JSON file at a specified path.

Example

{
  "op": "updateJSON",
  "targetSrc": "./package.json",
  "path": "scripts.build",
  "value": "webpack --config webpack.prod.js"
}

Fields

FieldsTypeDescription
op'updateJSON'Specifies the type of operation. For UpdateJSONOperation, this field must be 'updateJSON'.
targetSrcstringThe path to the JSON file to update.
pathstringThe JSON path where the value will be updated.
valuestringThe value to set at the specified path. This can include variables .