title: json obj into javascript array
body: <p>I have this json file</p>
  
  <pre><code>[
  {"name": "name1", "start": "01/03/2017", "end": "01/03/2017"},
  {"name": "name2", "start": "01/03/2017", "end": "01/03/2017"},
  {"name": "name3", "start": "01/03/2017", "end": "01/03/2017"}
  ]
  </code></pre>
  
  <p>and -i need this result in javascript</p>
  
  <pre><code>var cubes = [
      {name: "name1", start: "01/03/2017", end: "01/25/2017"},
      {name: "name2", start: "01/04/2017", end: "01/26/2017"},
      {name: "name1", start: "06/15/2017", end: "06/18/2017"},    
      {name: "name3", start: "01/05/2017", end: "01/27/2017"}
  ];
  </code></pre>
  
  <p>I have:</p>
  
  <pre><code>cubes = [];
  
  $.getJSON('urlaub.json', function(data) {
  
      var obj = data;
      for (elem in obj) {
          console.log(obj[elem]);
         cubes.push(obj[elem]);
      };
  });
  </code></pre>
  
  <p>But Array cubes is ever empty and .json firefox means syntax error in json File Line 1. But Objects were created. Array is ever empty.Tryed so many. What is wrong?</p>