This action enables you to update the value of an existing node in JSON data.

The Update node value action updates the JSON data stored in the session. Once the data has been modified, it can be used directly in subsequent JSON actions. Alternatively, you can retrieve the entire updated JSON using the Get node value action and save it to any JSON file.

过程

  1. Enter the JSON node path or press F2 to insert a variable in the JSON node path field.
    注: Enter Double dollar sign in the JSON node path field if you want to update a key at the root level of JSON.
  2. In the Value type field, select the value type from the drop-down list. (String, Number, Boolean, Datetime, List and Dictionary data types are supported).
  3. Depending on the data type you select, enter the corresponding value in the Value field to update the JSON data.
  4. Select Replace array node with a new value check box if you want to replace the entire array node with a new value.
  5. In the Session name field, enter the same session name or variable used in the Start session action.
    For more information on how to use some of the JSON actions, see this example topic 使用 JSON 构建自动化 actions.