Generating a Tree Diagram from 'Flat' Data
Learn how to generate a tree diagram using "flat" data.
Tree diagrams are a fantastic way of displaying information. But one of the drawbacks (to the examples we’ve been using so far) is the need to have your data encoded hierarchically.
Flat data
Most data in a raw form will be flat. That is to say, it won’t be formatted as an array with the parent-child relationships. Instead, it will be a list of objects ...