title: Data from Api is not in correct order?
body: <p>In my app I am using a REST API to get data from a database. When I check the response from the API request in Postman, it shows one format, and when I get the response and log the data, it shows another order which is completely different than what I require.</p>
  <p>What can be the problem? Please guide me.</p>
  <p>Postman response:</p>
  <pre><code>{
      &quot;testdata&quot;: {
          &quot;attributes&quot;: {
              &quot;year&quot;: {
                  &quot;2019&quot;: [
                      {
                          &quot;id&quot;: 1,
                          &quot;y&quot;: 2019,
                          &quot;q&quot;: 1,
                      }
                  ],
                  &quot;2018&quot;: [
                      {
                          &quot;id&quot;: 2,
                          &quot;y&quot;: 2018,
                          &quot;q&quot;: 1,
                      },
                      {
                          &quot;id&quot;: 3,
                          &quot;y&quot;: 2018,
                          &quot;q&quot;: 4,
                      }
                  ]
              },
          }
      }
  }
  </code></pre>
  <p>myComponent.ts</p>
  <pre><code>this.testService.getdata().subscribe(d =&gt; {
      console.log(d.testdata.attributes.year);
  });
  </code></pre>
  <p>I get this result</p>
  <pre><code>2018 Array(2)
  2019 Array(1)
  </code></pre>
  <p>instead of</p>
  <pre><code>2019 Array(1)
  2018 Array(2)
  </code></pre>
  <p>TestService.ts</p>
  <pre><code>getdata() {
      return this
        .http
        .get(`${environment.apiUrl}` + '/test/data');
  }
  </code></pre>