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