YAML_PARSE

Takes text containing YAML and parses to an object

Syntax 

YAML_PARSE(text, [parse_date_or_time: FALSE])

Usage examples 

Example 1

Input

1
{
2
"my_action": "---\ntimeout: 10\nqueues:\n- one\n- two\n- three\nscheduler:\n max_workers: 10\n"
3
}

Formula

YAML_PARSE(my_action)

Output

1
{
2
"queues": [
3
"one",
4
"two",
5
"three"
6
],
7
"scheduler": {
8
"max_workers": 10
9
},
10
"timeout": 10
11
}

Example 2

Input

1
{
2
"my_action": "\nLinkedDate: 2007-04-01 12:00:00\n"
3
}

Formula

YAML_PARSE(my_action, parse_date_or_time: TRUE)

Output

1
{
2
"LinkedDate": "2007-04-01 12:00:00 UTC"
3
}
Was this helpful?