flat

Learn how to use the flat function in Notion formulas.

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.

flat([[1, 2], [3, 4]]) /* Output: [1, 2, 3, 4] */
Code language: JavaScript (javascript)
About the Author

My name is Thomas Frank, and I'm a Notion-certified writer, YouTuber, and template creator. I've been using Notion since 2018 to organize my personal life and to run my business and YouTube channel. In addition to this formula reference, I've created a free Notion course for beginners and several productivity-focused Notion templates. If you'd like to connect, follow me on Twitter.

🤔 Have an UB Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas

🤔 Have a Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas