Linked to this question and this one also, I would like to know how to do the exact same thing but with a different type of JSON :
Here my JSON Object :
var myDb = {
"04c85ccab52880": {
"name": "name1",
"firstname": "fname1",
"societe": "soc1"
},
"04c95ccab52880": {
"name": "name2",
"firstname": "fname2",
"societe": "soc2"
},
"048574220e2a80": {
"name": "name3",
"firstname": "fname3",
"societe": "soc3"
}
};
My problem is that my JSON is different from their JSON, actually I have an array of array in mine. So how to convert this into a Javascript array ?
var arr = [];
$.each( myDb, function( key, value ) {
arr.push( value );
});
console.log(user_list);
This kind of script seems to return my 3 different objects but where are my uid from JSON ? How can I get them ? Because now my keys are 0,1,2 and no longer my uid.
Any ideas ? Thanks