The Get nodes action enables you to extract the key values from a JSON source that you specify in the Start session action.

You can specify the exact key or a specific path in the Get nodes to extract the keys. You also specify a new key name for the extracted value.

Settings

The following settings are available in this action.

Session name
Enter the session name that you specified in the preceding Start session action. You can enter the session name directly, select the string variable that contains the session name, or select the session variable.
Nodes to extract
Specify the nodes or the node path to extract their value. Select Add nodes and specify the following in the Add node modal:
  • Node key or path: Specify the node key name or the node path.

    Enter the key directly if

  • Value type: Select the data type of the node. The available options are String, Number, Boolean, and DateTime.
    Note: The Get node action extracts the date and time from the JSON source only if you specify the date and time in one of the following ISO8601 formats:
    • DateTimeFormatter.ISO_ZONED_DATE_TIME. For example: 2023-08-19T14:30:00+05:30[Asia/Kolkata]
    • DateTimeFormatter.ISO_OFFSET_DATE_TIME. For example: 2023-08-19T14:30:00+05:30
    • DateTimeFormatter.ISO_INSTANT. For example: 2023-08-19T14:30:00Z
  • Rename key: Specify a new key name for the node key that you extract from the JSON source. The value for the specified node is saved with the new key name in the output variable.
Assign output to a variable
Specify multiple variables to save specific node values or a dictionary variable to save all the extracted values in a single dictionary variable.
  • Multiple variables: Select Multiple variables > Add variable mapping and follow the prompts on the Variable mapping modal to enter a specific key and choose a corresponding variable in which the extracted node values must be saved.
  • Dictionary: Select Dictionary, and choose an existing dictionary variable or use Create variable option to create a dictionary variable.

Format for Node key or path setting

This section describes the format to specify node keys and node key paths in the Node key or path setting. You can use dot notation to extract nested nodes and nodes with arrays.

For this JSON source:

{
  "phone": "123456789",
  "company": 
	{
    "name": "XYZ Corp",
    "City": "ABC",
    "Country": "DEF",
	"orders": [
    {
      "orderId": "A-101",
      "item": "Laptop Stand",
      "price": 45.00
    },
    {
      "orderId": "A-102",
      "item": "Wireless Mouse",
      "price": 25.50
    }
    ]
  }
}
Specify the following:
  • phone to extract the phone number.
  • company.name to extract the company name.
  • company.orders[0].item to extract the item name (Laptop Stand) of the first order ID.