Answers.Body: <p>As @mats-mikkel-rummelhoff suggested, that data type is an array. So I was able to get the desired value by using:</p>
  
  <pre><code>'img' : node['media:content'][1]['@url']
  </code></pre>
  
  <p>Thanks, Mats.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-12T06:31:33.860Z
Answers.LastActivityDate: 2018-09-12T07:43:50.327Z
Answers.LastEditDate: 2018-09-12T07:43:50.327Z
Answers.UserDisplayName: Marcus Scheller
Body: <p>Probably pure twig:</p>
  
  <p>I am building an array from nodes taken from a RSS-feed where one of the keys contains a colon which of course breaks everything. Like so:</p>
  
  <p>Node in feed: </p>
  
  <pre><code>&lt;media:thumbnail url="stuff I like to get." /&gt;
  </code></pre>
  
  <p>My twig:</p>
  
  <pre><code>{% for node in feed %}
          {% set latestArticles = latestArticles|merge([{
                  'timestamp': node.pubDate|atom,
                  'title': node.title,
                  'uri': node.link,
                  'description': node.description,
                  'thumbnail' : node.media:thumbnail,
              }]) %}
          {% endif %}
      {% endfor %}
  </code></pre>
  
  <p>So how do I get <code>media:thumbnail</code>?</p>
  
  <p>I have tried different things but without luck.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-10T05:17:01.593Z
Comments.Text: Have you tried _brackets notation_, i.e. `node['media:thumbnail']`?
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-10T05:44:57.570Z
Comments.Text: Yes, I did. It says:
  
  `Key "media:thumbnail" for array with keys "title, link, pubDate, category, guid, description, dc:creator" does not exist.`
Comments.UserDisplayName: Marcus Scheller
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-10T16:48:05.577Z
Comments.Text: That suggests that the structure of the node object isn’t what you think it is. Try enabling devMode and do {{ dump(node) }} to see the object’s contents and structure
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-10T17:14:44.980Z
Comments.Text: Haven’t thought about dump. 
  
  No idea, why. You’re right, it’s an array. So the correct code is: `'img' : node['media:content'][1]['@url']`
  
  Thanks!
Comments.UserDisplayName: Marcus Scheller
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-10T23:32:38.243Z
Comments.Text: @MarcusScheller would you mind adding that as an official answer in case it ends up helping someone in the future?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-12T06:26:14.813Z
Comments.Text: That is the plan.
Comments.UserDisplayName: Marcus Scheller
Tags: <templating><array>
Title: Build array from nodes from RSS where keys contain colons
ThreadText: # Build array from nodes from RSS where keys contain colons
  
  (Asked by: username_0 on 2018-09-09)
  
  Probably pure twig:
  
  I am building an array from nodes taken from a RSS-feed where one of the keys contains a colon which of course breaks everything. Like so:
  
  Node in feed:
  
  ```
  <media:thumbnail url="stuff I like to get." />
  
  ```
  
  My twig:
  
  ```
  {% for node in feed %}
          {% set latestArticles = latestArticles|merge([{
                  'timestamp': node.pubDate|atom,
                  'title': node.title,
                  'uri': node.link,
                  'description': node.description,
                  'thumbnail' : node.media:thumbnail,
              }]) %}
          {% endif %}
      {% endfor %}
  
  ```
  
  So how do I get `media:thumbnail`?
  
  I have tried different things but without luck.
  
  **Tags:** templating, array
  
  > **Comments:**
  > **username_1**: Have you tried _brackets notation_, i.e. `node['media:thumbnail']`?  
  > **username_0**: Yes, I did. It says:  `Key "media:thumbnail" for array with keys "title, link, pubDate, category, guid, description, dc:creator" does not exist.`  
  > **username_1**: That suggests that the structure of the node object isn’t what you think it is. Try enabling devMode and do {{ dump(node) }} to see the object’s contents and structure  
  > **username_0**: Haven’t thought about dump.   No idea, why. You’re right, it’s an array. So the correct code is: `'img' : node['media:content'][1]['@url']`  Thanks!  
  > **username_2**: @username_0 would you mind adding that as an official answer in case it ends up helping someone in the future?  
  > **username_0**: That is the plan.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-09-12. Score: 1 | Accepted answer
  
  As @username_1-mikkel-username_1 suggested, that data type is an array. So I was able to get the desired value by using:
  
  ```
  'img' : node['media:content'][1]['@url']
  
  ```
  
  Thanks, username_1.
  
  
  ---
  
  