JessicaFeauto
2 months agoQrew Member
Make Request JSON returning blank when only one record returned
I am retrieving data from an external data source using Make Request. I am then using another Make Request to send data to a QB table using the format shown below. It works great when I have 2 or more records in the response. However, when I only have one, then every field ends up being blank, even though I can see data in the response. Any thoughts?
{# create records in XXXX table #}
"to": "XXXXX",
"data": [
{% for rec in f.json.response.xxxxxs.xxxx %}
{% if loop.index0<5800 %}
{
"12":{ "value": "{{rec['@creationdate']}}"},
"6":{ "value": "{{rec['@id']}}"},
"38":{ "value": "{{rec['@status']}}"}
}
{{ ", " if not loop.last else "" }}
{% endif %}
{% endfor %}
]
}