# JSON Extract Action

With the JSON Extractor Action, you can access key values from a JSON payload. For example, this action can be used alongside the FFProbe as JSON Action or MediaInfo as JSON Action to retrieve key values from either action's output.

The Node is used as follows: if the payload resembles this structure:

{% code overflow="wrap" %}

```json
{
    "id": 1,
    "sequenceID": "cba14e1e-fef8-4624-9679-b8d087140345",
    "name": "Breadcrumb Demo 21-04-2021 09-58-44 david",
    "audioTracks": {
        "numTracks": 8
    },
    "videoTracks": {
        "numTracks": 3
    },
    "frameSizeHorizontal": 1920,
    "frameSizeVertical": 1080,
    "timebase": "10160640000",
    "zeroPoint": "0",
    "end": "4897428480000",
    "markers": {
        "numMarkers": 0
    }
}
```

{% endcode %}

<figure><img src="https://content.gitbook.com/content/g3aidOE5kukL7ZTq8g05/blobs/Vlst1bEXaChdIzWCO5id/image.png" alt="" width="350"><figcaption><p>JSON extract action</p></figcaption></figure>

The complete payload must be added to the Node (see Figure 3.2.2). If you want to extract the frame size, you would add “frameSizeHorizontal” as the Key path. The result will be `1920`.

If you only have the path to a `.json` file, you need to read the file's content and use it as the Node's input.

#### Example:

If the file path is /Volumes/myfiles/myfile.json and the file content is:

{% code overflow="wrap" %}

```json
{
    "id": 1,
    "sequenceID": "cba14e1e-fef8-4624-9679-b8d087140345",
    "name": "Breadcrumb Demo 21-04-2021 09-58-44 david",
    "audioTracks": {
        "numTracks": 8
    },
    "videoTracks": {
        "numTracks": 3
    },
    "frameSizeHorizontal": 1920,
    "frameSizeVertical": 1080,
    "timebase": "10160640000",
    "zeroPoint": "0",
    "end": "4897428480000",
    "markers": {
        "numMarkers": 0
    }
}
```

{% endcode %}

Add this as the Payload: {file.content./Volumes/myfiles/myfile.json}

<figure><img src="https://content.gitbook.com/content/g3aidOE5kukL7ZTq8g05/blobs/zqAjU8B56Rks4IKGxMAa/image.png" alt="" width="375"><figcaption><p>JSON Extract Action node parameters</p></figcaption></figure>
