hierarchy
Given a object with parent and children made a hierarchy. Using a pair of child parent, gets hierarchy from a givem object.
Will be a good intention to combine map and filter in one iteration, that will be a good. Any way to solution this both iterations.