generates an easy d3 json object for generation of tree diagram