For further actions, you may consider blocking this person and/or reporting abuse
See why 4M developers consider Sentry, “not bad.”
Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.
Read next

What Can In-Browser JavaScript Do and What Are Its Limitations?
Md. Maruf Sarker -

🧠 Free Code Challenges, UX Trends Shaping 2025 & Duolingo's Retention Playbook
Adam Marsden -

Get Pending Transactions in Binance Smart Chain Mempool Using Ether.js and QuickNode
Quoc Huynh Website -

How to Create a Custom Priority Event Emitter in Node.js
aditya singh rawat - 493 -
Top comments (3)
Hey Deni, I think I understand your question but not entirely sure. Adding some code snippets or examples to your post would help us help you.
I'm guessing you don't need to loop through the endpoint itself and need to loop through the data it returns? If so, you'll have to see what the structure of the data returned. It's most likely an array, but it's hard to say without knowing the endpoint or what you're doing.
Generally though, the data comes back as JSON, either already as an array or an object of objects. The first step (usually) is to figure out what sort of data you're getting and go from there.
Hi Andy, yes the data comes back as JSON and it's an object of objects from which I need just a part of it not all the data.
You should be able to access that data and set it as a variable then. Here is an example:
It's up to you whether or not you want to store the entire data returned, which might make it easier for you in the long run: