Sort Array based on Notion relation id

Hi,

I have a scenario to synchronize 2 databases and when I watch database items I would like to order an array based on a Parent task id to be sure to get the Tasks with no parent task (Parent task id = null) in first place. But I can’t figure how to sort my array and I’m not even sure the sort would place the null values first…

The beginning of my scenario with the sort() :

My relation field “Tâche parente”

I don’t know how to find the raw name of my relation field…

Thank you for your help.
Jeremy

I found the raw name by mouse over the field…

image

2 Likes