1function arrayConvert(json){
2 var arr = [];
3 for(index in json){
4 var obj = json[index];
5 var key = null;
6 while(typeof obj == 'object'){
7 for(ind in obj){
8 if(key == null) key = ind;
9 obj = obj[ind];
10 }
11 }
12 arr.push({'key':key, 'val':obj});
13 }
14 return arr;
15}
16