# Processing a JSON array item by item?

**URL:** <https://community.mindstudio.ai/t/processing-a-json-array-item-by-item/1077>\
**Category:** Support\
**Created:** [June 6, 2025, 9:17am UTC](https://community.mindstudio.ai/t/processing-a-json-array-item-by-item/1077 "2025-06-06T09:17:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mefrankyt](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@mefrankyt](https://community.mindstudio.ai/u/mefrankyt)\
**Post date:** [June 6, 2025, 9:17am UTC](https://community.mindstudio.ai/t/processing-a-json-array-item-by-item/1077/1 "2025-06-06T09:17:32Z")

</div>

Hello everyone,

Sorry for this beginner’s question, but I just can’t find a solution.  
I would really appreciate some help on how to properly work with JSON.  
I can’t seem to find any information on how to solve this — neither in the mindStudio guides, YouTube tutorials, nor other sources.

How can I process a JSON array item by item?

Examples:  
• I have an array of URLs that I want to crawl one by one.  
• JSON arrays containing image prompts are generated from articles, and I want to create images from them.

There are countless use cases where this is necessary.

I can access the first item with  
{{get myJsonVariable “$.items[0].name”}}  
(or by changing the number to access a different item), but I can’t seem to use a variable for that number.

for example: {{get myJsonVariable “$.items[{{counter}}].name”}}  
this wont work.

Does anyone have any ideas for me?

Thank you so much.

---

<div class="post-metadata">

**Author:** ![Alex\_MindStudio](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.mindstudio.ai/alex_mindstudio/32/27_2.png) [@Alex\_MindStudio](https://community.mindstudio.ai/u/Alex_MindStudio)\
**Post date:** [June 6, 2025, 11:55am UTC](https://community.mindstudio.ai/t/processing-a-json-array-item-by-item/1077/2 "2025-06-06T11:55:04Z")

</div>

Hi @mefrankyt,

It sounds like the [Run Workflow](https://help.mindstudio.ai/building-ai-agents/automations/run-workflow-block) block is the best fit for your use case.

Here are a couple of examples you can remix into your workspace to explore how they’re structured:

**Simple** : [https://app.mindstudio.ai/agents/run-workflow-simple--remix-46a2a888/remix](https://app.mindstudio.ai/agents/run-workflow-simple--remix-46a2a888/remix)

**Advanced** : [https://app.mindstudio.ai/agents/run-workflow-advanced--remix-f3bfba48/remix](https://app.mindstudio.ai/agents/run-workflow-advanced--remix-f3bfba48/remix)

The key difference between them:

- The Simple version uses an Iterator to process individual items
- The Advanced version works with a structured JSON array

Since you’re already working with a JSON array, the Advanced version will likely be the better fit. You’ll just need to change the Execution Mode to Sequential.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![mefrankyt](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@mefrankyt](https://community.mindstudio.ai/u/mefrankyt)\
**Post date:** [June 7, 2025, 9:58am UTC](https://community.mindstudio.ai/t/processing-a-json-array-item-by-item/1077/3 "2025-06-07T09:58:26Z")

</div>

Perfect! Thank you ever so much — this makes me so happy. I guess I was overcomplicating it.

This is incredibly helpful!

---

<div class="post-metadata">

**Author:** ![mefrankyt](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@mefrankyt](https://community.mindstudio.ai/u/mefrankyt)\
**Post date:** [July 24, 2025, 1:40pm UTC](https://community.mindstudio.ai/t/processing-a-json-array-item-by-item/1077/4 "2025-07-24T13:40:45Z")

</div>

Thank you again for your help.

Using “Run Workflow” works great for this.

However, I’m facing the same problem again: I want to process a JSON array step by step, but I also want to manually intervene in the process.

Example:

The array contains several last names. I want each of them to be displayed to me one by one, and I want to manually enter the corresponding first names for each last name via an input block.

Sub-workflows seem to have the “problem” that you can neither display content nor use user input blocks within them. Is that correct?

Are there any ways I can solve this?

Thank you very much.
