1. Docs
  2. Formulas
  3. Functions

TO_MARKDOWN_LIST

Format an array as a markdown list, bulleted by default and numbered when ordered is TRUE. Whitespace within an item is collapsed, because a newline would end the item and start an unmarked paragraph. An empty array returns an empty string.

Categories: Text

Syntax

TO_MARKDOWN_LIST(array, [ordered: FALSE])

Examples

Example 1

Input

1
{
2
"my_action": {
3
"steps": [
4
"Triage the alert",
5
"Contain the host"
6
]
7
}
8
}

Formula

TO_MARKDOWN_LIST(my_action.steps)

Output

"- Triage the alert\n- Contain the host"

Example 2: Set ordered to TRUE for a numbered list. It defaults to FALSE.

Input

1
{
2
"my_action": {
3
"steps": [
4
"Triage the alert",
5
"Contain the host"
6
]
7
}
8
}

Formula

TO_MARKDOWN_LIST(my_action.steps, ordered: TRUE)

Output

"1. Triage the alert\n2. Contain the host"
Was this helpful?