# HUBL: For loop item within a variable call issue {{ row.item }}

**URL:** <https://community.hubspot.com/t/hubl-for-loop-item-within-a-variable-call-issue-row-item/10499>\
**Category:** CMS Development\
**Created:** [October 8, 2018, 5:22pm UTC](https://community.hubspot.com/t/hubl-for-loop-item-within-a-variable-call-issue-row-item/10499 "2018-10-08T17:22:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaitlyn](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kaitlyn/32/48852_2.png) [@kaitlyn](https://community.hubspot.com/u/kaitlyn)\
**Post date:** [October 8, 2018, 5:22pm UTC](https://community.hubspot.com/t/hubl-for-loop-item-within-a-variable-call-issue-row-item/10499/1 "2018-10-08T17:22:06Z")

</div>

Is there a way to include a for loop item within another variable call? For example, below I have a for loop, looping over the rows in a HubDB table. Inside, I have another for loop, looping over items in an array.

Inside that, there’s a paragraph, where I’d like to echo out the row’s value for the column labeled “column\_1” (example for during the first iteration of the loop).

Right now, {{ row.item }} is looking for a column called “item” instead of pulling “item” from the for loop. How can I fix this?

```auto
{% set exampleArray = ['column_1', 'column_2'] %}

{% for row in hubdb_table_rows(dynamic_page_hubdb_table_id) %}
 {% for item in exampleArray %}
 <p>{{ item }}: {{ row.item }}</p>
 {% endfor %}
{% endfor %}

```

---

<div class="post-metadata">

**Author:** ![tjoyce](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tjoyce/32/88832_2.png) [@tjoyce](https://community.hubspot.com/u/tjoyce)\
**Post date:** [October 8, 2018, 6:43pm UTC](https://community.hubspot.com/t/hubl-for-loop-item-within-a-variable-call-issue-row-item/10499/2 "2018-10-08T18:43:42Z")

</div>

@kaitlyn - I haven’t tested this but can you try row[item]

---

<div class="post-metadata">

**Author:** ![kaitlyn](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kaitlyn/32/48852_2.png) [@kaitlyn](https://community.hubspot.com/u/kaitlyn)\
**Post date:** [October 8, 2018, 6:45pm UTC](https://community.hubspot.com/t/hubl-for-loop-item-within-a-variable-call-issue-row-item/10499/3 "2018-10-08T18:45:11Z")

</div>

That worked, thank you!

---

<div class="post-metadata">

**Author:** ![tjoyce](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tjoyce/32/88832_2.png) [@tjoyce](https://community.hubspot.com/u/tjoyce)\
**Post date:** [October 8, 2018, 6:45pm UTC](https://community.hubspot.com/t/hubl-for-loop-item-within-a-variable-call-issue-row-item/10499/4 "2018-10-08T18:45:48Z")

</div>

lucky guess 😄
