title: create class instances from json array
body: <p>I load a json array with this format</p>
  
  <pre><code>[{
      id = 1;
      name = “test1”;
  }, {
      id = 2;
      name = “test2”;
  }, {
      id = 3;
      name = “test#”;
  }, {
      id = 4;
      name = “test$”;
  }]
  </code></pre>
  
  <p>And I have a class called <code>MyClass(id: int, name: String)</code>. For each element in the json I want to create an instance of MyClass. objects containt an array of the json element. Would it be possible to do something like</p>
  
  <pre><code>for object in objects{
  MyClass(object)
  }
  </code></pre>
  
  <p>or how shall I parse the json?</p>