PRETTY_PRINT

Description

PRETTY_PRINT takes a dictionary, list, or JSON string and returns it formatted as an indented, human-readable JSON string with keys sorted alphabetically.

This is useful for displaying structured data in a readable way, for example in a calculated field or document template.

Example

p is Person
PRETTY_PRINT(p.metadata)

If p.metadata is {"b": 2, "a": 1}, this returns:

{
  "a": 1,
  "b": 2
}

Last updated

Was this helpful?