javascript complex recurrsion [on hold]
- by Achilles
Given Below is my data in data array. What i am doing in code below is that from that given data i have to construct json in a special format which i also gave below.
//code start here
var hierarchy={};
hierarchy.name="Hierarchy";
hierarchy.children=[{"name":"","children":[{"name":"","children":[]}]}];
var countryindex;
var…