Skip to content

Change JSON

  • Condition
  • Text & math
  • Advanced mode

Sets one value in JSON text, removes one, or adds an item to a list in it, and gives the changed JSON back. The path is written as in Read JSON: user.email, items[0].title. Setting a value whose parents are missing makes them.

In the editor, press Space on the canvas to add a step, then open Conditions > Text & math, or type its name. In Simple mode it's under Show all, and search finds it.

Settings

JSON

Text Required

Usually wired from HTTP Request's Response, Read Text File or Build JSON.

Starts as: {} Takes ${variables} and expressions Can come from another step's output

Path

A file or folder path Required

Where the value is, e.g. user.email or items[2].

Starts as: empty Takes ${variables} and expressions Can come from another step's output

Action

A choice
  • Set the value
  • Remove it
  • Add to the list there: The path names a list; the value goes at its end.

Starts as: Set the value Can come from another step's output

Value

Text

Starts as: empty Takes ${variables} and expressions Can come from another step's output

Value type

A choice
  • Text
  • Number
  • Yes / No: true or false.
  • List: One item per line becomes a list.
  • JSON: Put in as it is, e.g. {"a": 1}.

Starts as: Text Can come from another step's output

Outputs

Values the step gives to the steps after it. In the Graph view, drag a wire from an output to another step's field.

Change JSON outputs
OutputGivesWhat it is
JSONTextThe changed JSON; the JSON as it was when it couldn't be changed.
FoundYes or noFalse when the JSON isn't valid or the path couldn't be reached.
ErrorTextWhy it couldn't be changed; empty when it worked.

More in Text & math