# Nested range problem

**URL:** <https://discourse.gohugo.io/t/nested-range-problem/29245>\
**Category:** support\
**Created:** [November 5, 2020, 2:09pm UTC](https://discourse.gohugo.io/t/nested-range-problem/29245 "2020-11-05T14:09:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [November 5, 2020, 9:07pm UTC](https://discourse.gohugo.io/t/nested-range-problem/29245/2 "2020-11-05T21:07:13Z")

</div>

When posting code to the forum, please use code fences instead of blockquotes. See:  
[https://discourse.gohugo.io/t/sharing-code-in-the-forums/8968](https://discourse.gohugo.io/t/sharing-code-in-the-forums/8968)

The outer range is scoped to `.Params.app_monthly_plans`. That means your inner range is trying to iterate through `.Params.app_monthly_plans.Params.app_feature_data`, which doesn’t exist. Please read:  
[https://regisphilibert.com/blog/2018/02/hugo-the-scope-the-context-and-the-dot/](https://regisphilibert.com/blog/2018/02/hugo-the-scope-the-context-and-the-dot/)

Instead of this:

```auto
{{range $index, $plan_feature := .Params.app_feature_data}}

```

Do this:

```auto
{{range $index, $plan_feature := $.Params.app_feature_data}}

```

Also, in the page’s frontmatter, make sure `app_feature_data` is defined _before_ `[[app_monthly_plans]]`.

---

_[View the full topic](https://discourse.gohugo.io/t/nested-range-problem/29245)._
