I have a list in AngularJS, $scope.list[];
What I want to know is how can I fill that list to fit a key,value structure like this:
$scope.list[{key,value},{key,value}];
and I want to fill that "map" with data coming in json format:
{
exportData {
id: 1,
name : "Peter",
lastname : "Smith"
age : 36
}
}
Where the Id is going to be the KEY and the rest of the strucure is going to be de VALUE
For example in a structure like this:
[
1: {
name : "Peter",
lastname : "Smith"
age : 36
},
2: {
name : "John",
lastname : "Carlos"
age : 40
},
]