title: Change index in array.map
body: <p>I have a variable of the form:</p>
  
  <pre><code>var data=[
  {
      start:22,
      end: 8
  },
  {
      start:60,
      end: 43       
  },
  {
      start: 35,
      end: 55
  },
  {
      start:25,
      end:40
  }
  ];
  </code></pre>
  
  <p>I want to map it to look like this</p>
  
  <pre><code>var newData = { 22:8, 60:43, 35:55, 25:40};
  </code></pre>
  
  <p>Is this possible? I mainly just want to use the start numbers as a key to access the end numbers without using search. I have tried to do this: </p>
  
  <pre><code> var mapData = data.map(function(data){
    var x = {};
    x[data.start]=data.end;
    return x;
  });
  </code></pre>
  
  <p>but it gives:
      0
  :
  {22: 8}
  1
  :
  {60: 43}
  2
  :
  {35: 55}
  3
  :
  {25: 40}
  which means i have to use 0, 1,2, 3 as indices.</p>