a js script for creating a tree data structure based on an array of objects