Skip to content

JSON arrays #17

@Tom-Jans

Description

@Tom-Jans

Is it possible to replace multiple values in a json array?

Example:

{
  "bindings": [
    {
      "type": "httpTrigger",
      "direction": "in",
      "webHookType": "genericJson",
      "name": "req"
    },
    {
      "type": "http",
      "direction": "out",
      "name": "res"
    },
    {
      "type": "blob",
      "name": "name2",
      "path": "path2",
      "connection": "connection_storage",
      "direction": "in"
    },
    {
      "type": "blob",
      "name": "name2",
      "path": "path2",
      "connection": "connection_storage",
      "direction": "in"
    }
  ],
  "disabled": false
}

In this json file i want to replace the connection attribute of all elements in the bindings array.

I tried this
Transformation file:

{
  "bindings/connection": "test"
}

Result:

{
  "bindings": {
    "connection": "test"
  },
  "disabled": true
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions