title: Javascript Change an array to look in a particular format
body: <p>I have an array that's displaying on a particular format and I need it modified so that it displays on another format.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>var arr = {
      "id":"100",
          "name":"the name",
          "places":[
      {
          "id":"23",
          "name":"first place",
          "startDate":"2015-01-30 15:01:00",
          "endDate":"2015-01-30 17:01:00"
      },
  
      {
          "id":"54",
          "name":"second place",
          "startDate":"2015-01-31 17:01:00",
          "endDate":"2015-02-01 17:01:00"
  
      },
      {
          "id":"400",
          "name":"third place",
          "startDate":"2015-02-01 17:01:00",
          "endDate":"2015-02-05 17:01:00"
  
      }
  
  ]
  
  }
  
  var phases = mainData.places.map(function(e){
     return e.name + "," + 50;
  });
  
  myvar = [ places ];
  </code></pre>
  
  <p>This is displaying the data like this:</p>
  
  <pre><code>["first place,50", "second place,50", "third place,50"]
  </code></pre>
  
  <p>But I need to data to be displayed like this:</p>
  
  <pre><code>[ ['first place', 50],['second place', 50],['third place', 50] ];
  </code></pre>
  
  <p>How can I change the code so that it displays in the wanted format?</p>