I have this tree: And I want to transform the data in this format so I can display with React-Flow (example here: https://reactflow.dev/examples/layouting/ This is the format I want: So ultimately I need to convert it to an array, get all the keys as id and get to find source and destination, based on parent/child structure. I would appreciate any