IronFlowDocs

yaml_parse

Parse a YAML string into a JSON object.

Parameters

inputstringone of input or source_key
YAML string; supports ${ctx.key} interpolation.
source_keystringone of input or source_key
Context key containing the YAML string.
output_keystringdefault "yaml_data"
Context key for the parsed JSON output.

Providing both input and source_key is an error.

Context Output

  • <output_key> (default yaml_data) — the parsed JSON value.

Example

local flow = Flow.new("parse_yaml")

flow:step("parse", nodes.yaml_parse({
    input = "name: Alice\nage: 30\ntags:\n  - rust\n  - lua",
    output_key = "config"
}))

flow:step("done", nodes.log({
    message = "Config: ${ctx.config}"
})):depends_on("parse")

return flow

IronFlow documentation

Find the next step

Type a keyword to search the documentation.

to move · Enter to open · Esc to close