title: How to split json array from ajax GET into objects?
body: <p>Good night everyone.</p>
  <p>I've seen this question answered in other posts, but no answer works for me, I'm new in ajax/json and I'm a bit lost.
  I have this ajax call that returns me a JSON array:</p>
  <pre><code>$.ajax({
              type: &quot;GET&quot;,
              url: common.RestURL.index,
              dataType: 'json'
  
          }).done(parameters =&gt; {
              //Fill parameters
              drawSettings(parameters);
  
          }).fail(function (jqXHR, textStatus, error) {
              showMsg(jqXHR.responseJSON.message,
                  &quot;Error&quot;,
                  &quot;error&quot;);
          });
  </code></pre>
  <p>This is the exact json object to return:</p>
  <pre><code>&quot;config&quot;: [
  {
    &quot;configDescription&quot;: &quot;description1&quot;,
    &quot;configValue&quot;: &quot;value1&quot;,
    &quot;configKey&quot;: &quot;key1&quot;,
    &quot;idCompany&quot;: &quot;company1&quot;,
    &quot;appConfigurationId&quot;: &quot;config1&quot;,
    &quot;configType&quot;: &quot;List&quot;
  },
  {
    &quot;configDescription&quot;: &quot;description2&quot;,
    &quot;configValue&quot;: &quot;value2&quot;,
    &quot;configKey&quot;: &quot;key2&quot;,
    &quot;idCompany&quot;: &quot;company2&quot;,
    &quot;appConfigurationId&quot;: &quot;config2&quot;,
    &quot;configType&quot;: &quot;Date&quot;
  },
  {
    &quot;configDescription&quot;: &quot;description3&quot;,
    &quot;configValue&quot;: &quot;value3&quot;,
    &quot;configKey&quot;: &quot;key3&quot;,
    &quot;idCompany&quot;: &quot;company3&quot;,
    &quot;appConfigurationId&quot;: &quot;config3&quot;,
    &quot;configType&quot;: &quot;String&quot;
  },
  {
    &quot;configDescription&quot;: &quot;description4&quot;,
    &quot;configValue&quot;: &quot;value4&quot;,
    &quot;configKey&quot;: &quot;key4&quot;,
    &quot;idCompany&quot;: &quot;company4&quot;,
    &quot;appConfigurationId&quot;: &quot;config4&quot;,
    &quot;configType&quot;: &quot;Boolean&quot;
  }]
  </code></pre>
  <p>So when the ajax call gets the json array, it calls another method that works with each of the objects in the array, but when I try to create each object, they are created empty and I can't find the problem, this is the function I'm talking about:</p>
  <pre><code>function drawSettings(parameters) {
  
      if (!$.isArray(parameters)) {
          parameters = [parameters];
      }
  
      //Fill params in div
      $.each(parameters, function (key, value) {
  
          //Parameter to draw
          console.log(&quot;value ..........................&quot; + value.configDescription);
          let param = new Parameter(value);
          console.log(&quot;objetooo ------------ &quot; + param.configDescription);
  </code></pre>
  <p>The Parameter class is a simple class with the attributes of the json ojects and the logs show the attributes with &quot;undefined&quot; value.
  Can please someone help me understand and solve the problem?</p>
  <p>Thanks to everyone in advance!</p>