Javascript – How to build a tree from flat array of objects
I am trying to build a tree array from a flat array of objects. The category field is structured as an array because it can have n categories let data = [ { category: [ "Kat1" ], otherFields: [ "Document…