NUNJUCKS setting a variable

2.1k Views Asked by At

Hi all Im calling data from a json file. Whe I create the following loop:

{% for item in resume.applications %}
    <span class="expanded uppercase">{{ item.fields.Job }}</span>
    {{ item.fields.intro | safe }}
    {% endfor %}

The span renders with the correct html content. However if I try to set a variable without a loop:

{% set job = resume.applications %}
<span>{{ job.fields.intro }}</span>

I get nothing? Not sure what I'm doing wrong. Thanks.

I get nothing

0

There are 0 best solutions below