Javascript – How can I add the correct depth value to a nested json object when children have multiple parents
I'm facing an issue when trying to add a depth value to each object to a nested array. The specific issue I'm facing is that when an object has multiple siblings the depth is applied to the first but not…