title: How to destructure Objects from API?
body: <p>I'm calling an API from (<a href="https://reqres.in/api/users" rel="nofollow noreferrer">https://reqres.in/api/users</a>), can we destructure this API into a single array of object. So that I can customize per-page which is fixed in the API.</p>
  
  <pre><code>This is Codepen link https://codepen.io/monukr14/pen/oOWpyq
  
  
  
  Initial API Format
  
  {
    "page": 1,
    "per_page": 3,
    "total": 12,
    "total_pages": 4,
    "data": [
      {
        "id": 1,
        "first_name": "George",
        "last_name": "Bluth",
        "avatar": "https://s3.amazonaws.com/uifaces/faces/twitter/calebogden/128.jpg"
      },
      {
        "id": 2,
        "first_name": "Janet",
        "last_name": "Weaver",
        "avatar": "https://s3.amazonaws.com/uifaces/faces/twitter/josephstein/128.jpg"
      },
      {
        "id": 3,
        "first_name": "Emma",
        "last_name": "Wong",
        "avatar": "https://s3.amazonaws.com/uifaces/faces/twitter/olegpogodaev/128.jpg"
      }
    ]
  }
  </code></pre>