FuelPHP Bin
Sign in
Url:
Fork
This is the JSON I'll nowe get: { "1":{ "data":"Bill", "left_id":"1", "right_id":"10", "attr":{ "id":"1" }, "children":{ "2":{ "data":"Angela", "left_id":"2", "right_id":"5", "attr":{ "id":"2" }, "children":{ "8":{ "data":"Philipp", "left_id":"3", "right_id":"4", "attr":{ "id":"8" }, "children":[ ] } } }, "3":{ "data":"Ben", "left_id":"6", "right_id":"7", "attr":{ "id":"3" }, "children":[ ] }, "9":{ "data":"Karl", "left_id":"8", "right_id":"9", "attr":{ "id":"9" }, "children":[ ] } } } } What I need is the same without the keys: { "data":"Bill", "attr":{ "id":"1" }, "state":"open", "children":[ { "data":"Angela", "attr":{ "id":"2" }, "children":[ "data":"Karl", "attr":{ "id":"9" } ] }, { "data":"Ben", "attr":{ "id":"3" } }, ] }