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:

{
    "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
    }
}

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:

{
    "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
    }
}

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

Last updated