I want to show data in a parent-child(bu_name) format using angularJs, I used ng-repeat but it's not working in a paren-child manner, Please give hint or explanation how to solve this problem?
var businessData = [{
"bu_id": 2,
"tenant_id": 1,
"company_id": 1,
"bu_name": "qhhjqqw",
"created_date": "2016-05-31 10:58:06",
"updated_date": "2016-05-31 10:58:06",
"parent_id": null
}, {
"bu_id": 3,
"tenant_id": 1,
"company_id": 1,
"bu_name": "kqjjk",
"created_date": "2016-05-31 10:58:12",
"updated_date": "2016-05-31 10:58:12",
"parent_id": 2
}, {
"bu_id": 5,
"tenant_id": 1,
"company_id": 1,
"bu_name": "parent",
"created_date": "2016-06-28 08:32:34",
"updated_date": "2016-06-28 08:32:34",
"parent_id": null
}, {
"bu_id": 6,
"tenant_id": 1,
"company_id": 1,
"bu_name": "child",
"created_date": "2016-06-28 08:32:48",
"updated_date": "2016-06-28 08:32:48",
"parent_id": 5
}, {
"bu_id": 7,
"tenant_id": 1,
"company_id": 1,
"bu_name": "child_s child",
"created_date": "2016-06-28 08:33:16",
"updated_date": "2016-06-28 08:33:16",
"parent_id": 6
}];