How can I Loop over Large data and trim the object array list one by one?

Describe the problem/error/question

I’m trying to loop through an array of comments one by one and add them to a database but i cant seem to get the looping to actually work the way I want it to.

What is the error message (if any)?

None

Please share your workflow

Share the output returned by the last node

Desired Output:
{ "target":0, "text": $items.comments[$runIndex].text }
the text field would the text of the comment

Information on your n8n setup

  • n8n version: 0.221.2
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Default
  • Running n8n via : Docker
  • Operating system: UNIX Ubuntu on Digital Ocean

Hi @Yeehawlerz101, welcome to the community :tada:

It seems your HTTP Request node requires authentication so I couldn’t test your exact data structure on my side. I am also not quite sure I understand the output you have in mind, though I guess this comes down to me not knowing your data structure again.

In general, you could loop through data and even use the Code node when doing so:

Perhaps you can share the data structure your HTTP Request node returns? This should make it a bit easier to help with this :slight_smile: