```
{% for data in data_list %}
    {% set data_index = {{loop.index}} %} 
   for data_dict in data:
     pass

```

In my inner loop, I need to use the loop index in the outer loop, so I intend to set it to a variable as above. But the syntax is invalid.

How to do that? Or is there another way to get the outer loop index?