title: react-native fetch async/await response filtering
body: <p>I have response from my server like <code>buildings : [record1, record2, ...]</code> and I want to get only the array from that response. How can I get just the array from the Promise? I have tried some async/await things but I didn't understand how to use it in this code:</p>
  
  <pre><code>setupImpagination() {
      ....
      fetch(pageOffset, pageSize, stats) {
          return fetch(`http://localhost:3000/api/building/all?skip=${pageOffset}&amp;limit=${pageSize}`)
              .then(response =&gt; {
              console.log('response.json() =&gt; ',response.json());
              response.json()
              })
              .catch((error) =&gt; {
              console.error(error);
              });
  
      }
      });
  }
  </code></pre>