Skip to content

prettyPrintJSON

prettyPrintJSON(json, indent?) → string · Format

Pretty-print a JSON string with optional indentation.

  • json (required): JSON string to format

  • indent (optional): indentation size (default 2)

utlx
prettyPrintJSON($input.compactJson)      // formatted with 2-space indent

Released under AGPL-3.0.