title: Loop through axios request.data in node error
body: <p>i have been trying to loop through an axios request but i keep getting the error in my logs, i am trying  to loop through my data, the returned structure of my data looks like this</p>
  <pre><code>{2 items
  &quot;data&quot;:[1 item
  0:{...}34 items
  ]
  &quot;pagination&quot;:{4 items
  &quot;page&quot;:0
  &quot;itemsPerPage&quot;:0
  &quot;hasNextPage&quot;:true
  &quot;hasPrevPage&quot;:true
  }
  }
  </code></pre>
  <p>here is the error</p>
  <pre><code>scheduledFunction
  SyntaxError: Unexpected token o in JSON at position 1 at JSON.parse (&lt;anonymous&gt;)
  </code></pre>
  <p>here is my code</p>
  <pre><code>var options = {
    method: 'GET',
    url: 'https://elenasport-io1.p.rapidapi.com/v2/fixtures',
    params: {to: d3, page: '1', from: d2},
    headers: {
      'x-rapidapi-key': '63836fd5cemshe5de364e7512350p145aebjsn744427db1224',
      'x-rapidapi-host': 'elenasport-io1.p.rapidapi.com'
    }
  };
  
  axios.request(options).then(function (response) {
  
  
  
      //console.log(response.data);
  
  
      data = JSON.parse(response.data); // this is the data you need to process in the request
  
      console.log(data);
  
      data.pagination.forEach(obj =&gt; {
          Object.entries(obj).forEach(([key, value]) =&gt; {
              console.log(`${key} ${value}`);
          });
          
  
  
  
  
  
  }).catch(function (error) {
      console.error(error);
  });
  
  
  
  
  
  })
  </code></pre>