<p>I think I figured it out ... I guess since I'm only getting one results I can't actually loop through.  Eg: the following works. </p>

<pre><code>{% set feed = craft.feedme.feed(params) %}
id: {{ feed.id }}
form: {{ feed.form }}
</code></pre>

CC BY-SA 4.0
2019-10-23T20:52:38.390Z
2019-10-23T20:52:38.390Z
Erant
<p>I'm trying to load a JSON feed and parse/display the data.  My code below generates an error - "impossible to access id on a string variable".  Below is some sample JSON data I get back along with code I tried to use to display.  Any help accessing my JSON data would be hugely appreciated.</p>

<p>Code to load / display feed (does not work):</p>

<pre><code>{% set params = {
    url: 'https://jsonURL',
    type: 'json',
    element: '',
    cache: 60,
} %}

{% set feed = craft.feedme.feed(params) %}

{% for node in feed %}
    node: {{ node.id }}
{% endfor %}
</code></pre>

<p>JSON feed data:</p>

<pre><code>{
    "id":"546852386",
    "timestamp":"2019-10-17 15:35:47",
    "user_agent":"Mozilla",
    "remote_addr":"1234",
    "payment_status":"",
    "form":"12345",
    "latitude":"123",
    "longitude":"123",
    "data":[
        {
            "field":"83628997","value":"first = aa\nlast = a"
        },
        {
            "field":"83691483",
            "value":"1"
        }
    ],
    "pretty_field_id":"83628997"
}
</code></pre>

<plugin-feedme>
Can't acces JSON data from FeedMe Feed
# Can't acces JSON data from FeedMe Feed

(Asked by: username_0 on 2019-10-23)

I'm trying to load a JSON feed and parse/display the data.  My code below generates an error - "impossible to access id on a string variable".  Below is some sample JSON data I get back along with code I tried to use to display.  Any help accessing my JSON data would be hugely appreciated.
Code to load / display feed (does not work):
{% set params = {
    url: 'https://jsonURL',
    type: 'json',
    element: '',
    cache: 60,
} %}

{% set feed = craft.feedme.feed(params) %}

{% for node in feed %}
    node: {{ node.id }}
{% endfor %}

JSON feed data:
{
    "id":"546852386",
    "timestamp":"2019-10-17 15:35:47",
    "user_agent":"Mozilla",
    "remote_addr":"1234",
    "payment_status":"",
    "form":"12345",
    "latitude":"123",
    "longitude":"123",
    "data":[
        {
            "field":"83628997","value":"first = aa\nlast = a"
        },
        {
            "field":"83691483",
            "value":"1"
        }
    ],
    "pretty_field_id":"83628997"
}

**Tags:** plugin-feedme


---

## 1 answers

### Answer by username_0 on 2019-10-23. Score: 1

I think I figured it out ... I guess since I'm only getting one results I can't actually loop through.  Eg: the following works. 
{% set feed = craft.feedme.feed(params) %}
id: {{ feed.id }}
form: {{ feed.form }}


---

