I'm not sure I am asking the right question or not. I get a JSON response like this from my server request
{
"20150917":
{
"Daily01sec":
{
"TG01152600000": "\/20150917\/Daily01sec\/TG0115260.bin",
"TG01152600600": "\/20150917\/Daily01sec\/TG0115260.bin",
}
},
"201510":
{
"05":
{
"Daily01sec":
{
"TG01152780600": "\/201510\/05\/Daily01sec\/TG01152780600.bin",
}
}
},
"201509":
{
"05":
{
"Daily01sec":
{
"TG01152780600": "\/201510\/05\/Daily01sec\/TG01152780600.bin",
}
}
}
}
I want to count all folders and sort them.
I want to get sorted like this for master folders:
"201509"
"201510"
"20150817"
please check the example data at here http://jsfiddle.net/ebrahimmm/ncykb0qq/1/
here is the code receiving via $http at angularJS
angular.module('app',[])
.controller('cntl',function($scope,$http){
$http.get('http://'+'server' + "/getdatalogtree").
then(
function (response) {
var data=response.data;
//here i need sorting
},function(response){
});
});
I also want to put each mast folders and its content to be an element of an array.