JSON Extract Action

With the help of the Json Extractor Action it is possible to access the key value from a Json payload. This action can be used, as an example, together with the FFProbe as Json Action and the MediaInfo as Json Action to retrieve the key value from one of these actions. The Node is used like this: If the payload looks like this:

{
    "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 has to be added to the Node (see figure 3.2.2) If the frame size should be extracted you need to add “frameSizeHorizontal” as Key path (see figure 3.2.2). The result will be: 1920. If you only know the path to a .JSON file you need to read out the content of that file and use the content as the input for the Node.

Example:

  • If the file is called:/Volumes/myfiles/myfile.json

  • And the content of the file looks like this:

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