Skip to content

Property Paths#

Property paths are strings that help extract or modify nested properties in JSON, YAML, TOML, or INI data. After parsing this data with the Parser node, you can use property paths to extract or change values from the parsed object. Nodes like Property Getter and Property Setter use these paths to access or set values in nested objects and arrays using dot and bracket notation.

Please note that all nodes with property path inputs will throw an error if the path is invalid, type mismatched, or the property does not exist in the data.

Examples#

Given is the following simple JSON example:

{
    "user": {
        "name": "John Doe",
        ...
    }
}

To access the name property, you can use the property path user.name. The dot . is used to navigate through the object's properties. If you want to access an array element, you can use the bracket notation [] with the index of the element.

{
    "array": [
        "first",
        "second",
        ...
    ]
}

To access the first element of an array as shown above, you can use the property path array[0] using the bracket notation.