Skip to content

parse

parse(string, format?) → value · Format

Parse a string into a navigable UDM value, auto-detecting format or using the specified format.

  • string (required): the string to parse

  • format (optional, default auto-detect): "json", "xml", "yaml", "csv"

utlx
// Parse XML from a CDATA section:
let innerXml = parse($input.Payload, "xml")
innerXml.Order.Customer                  // "Acme Corp"

// Auto-detect format:
let parsed = parse($input.rawData)       // auto-detects JSON, XML, or YAML

For normal file processing, use input json/input xml in the header — these functions are for the embedded-format-as-value case.

Released under AGPL-3.0.