Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

JSON

Parse JSON

  • Attempt to convert raw text into a JSON value
  • If unable to parse, outputs to failure pin
  • Does not guarantee a particular structure
    • Result can be an object, array or primitive value
    • Use Validate JSON to ensure structure

Gather JSON

  • Takes JSON or primitive values into a JSON array
  • Does not parse text into JSON
  • Can take any number of inputs
  • Input pins correspond to index in array
  • Unwired pins will have null entries in the output
  • Rarely useful alone, but works well with Transform JSON

Validate JSON

Transform JSON

  • An advanced tool for manipulating JSON documents
  • Uses jaq which is based on jq
    • Functional expression language for structural transformations
    • Very flexible and efficient once familiar
  • Use cases
    • Restructure arrays from Gather JSON into objects
    • Transform JSON value into arguments for Invoke Tool
    • Create templating context for Template nodes
    • Filter and restructure data from tool results

Unwrap JSON

  • Convert a JSON value into a native wire type
  • If JSON input is not compatible, node will emit a failure
  • Use Parse/Transform/Unwrap to extract data from (semi-) structured text
    • e.g. parse a tool result, transform to a single value, then unwrap