Get the values of multiple properties from a JSON object by using the GetProperties component in RPA Desktop Design Studio.

Before you begin

Role required: none

About this task

To configure the properties of the GetProperties component, see Properties of the JSON utilities.

Procedure

  1. In the Toolbox pane, navigate to Utilities > JSON.
  2. Drag the GetProperties component to the Design surface.
  3. Click the component settings icon (Component settings icon.).
  4. Click the Add property icon (Add keys icon.).
  5. Enter a property name.
  6. (Optional) Repeat the steps to add multiple property names.
    A Data In port is added with each property that you add.
  7. Click OK.
  8. To configure the input fields, see Configure port properties.
  9. (Optional) Connect the data and control ports of the GetProperties component to the corresponding ports of the other components as described in the following table.
    Port type Port name Data type Description
    Data In JsonObject Object The JSON object from which to extract property values.

    JSON object to be passed from the previous component.

    Serialize the JSON and pass it from the previous component to get properties.

    Example of JSON object:
    {
      "name": "Abel Tutor",
      "age": 30,
      "email": "abletutor@example.com",
      "address": {
        "street": "123 Main St",
        "city": "New York",
        "state": "NY",
        "zip": "10001"
      },
      "phoneNumbers": [
        {
          "type": "home",
          "number": "555-1234"
        },
        {
          "type": "work",
          "number": "555-5678"
        }
      ],
      "isActive": true
    }
    
    Data Out Name of the port is the same as the name of the properties that you added. Object Returns the values of the properties.

    If no property value is found, the port return an error.

  10. (Optional) To test the component, right-click the component bar and click Run From Here.