New in Formulas 2.0
The flat()
function flattens multiple lists into a single list.
flat(list)
list.flat()
Code language: JavaScript (javascript)
Note that unlike the flat()
function in JavaScript, you cannot specify the depth. Notion’s version will only flatten one “level” of lists.
Example Formulas
flat([[1, 2], [3, 4]]) /* Output: [1, 2, 3, 4] */
Code language: JavaScript (javascript)