<p>It seems that FeedMe cannot process such JSON objects as it needs them to be cleaner. </p>

<p>I ended up doing a lot of PHP processing of my exported data until it had the below format. With that FeedMe was happy.</p>

<pre><code>{  
  "title":"Emily Wurramara",
  "album":[  
     {  
        "album_release_date":"2017-02-08",
        "album_description":"",
        "album_tracks_1":"Hey Love",
        "album_tracks_2":"",
        "album_cover":"emily-wurramura_hey-love.jpg",
        "album_amazon_link_id":"",
        "album_itunes_link_album_name":"hey-love-single/1203932967",
        "album_title":"Hey Love (Single)"
     },
     {  
        "album_release_date":"2017-02-22",
        "album_description":"",
        "album_tracks_1":"Hey Love Me Too",
        "album_tracks_2":"",
        "album_cover":"emily-wurramura_hey-love.jpg",
        "album_amazon_link_id":"",
        "album_itunes_link_album_name":"hey-love-single/1203932967",
        "album_title":"Hey Love (Me Too)"
     }
  ]
},
</code></pre>

CC BY-SA 4.0
2018-08-06T08:39:15.353Z
2018-08-06T08:39:15.353Z
Crafty Cat
<p>I have a section called "Musicians" which is already set up and populated.
It has an unpopulated "Albums" Matrix field which will hold each artist's albums.</p>

<p>I have exported the albums as a separate JSON file. Now I like to import them into the existing "Musicians" section's Matrix field.</p>

<p>But my three test album entries fail to get added to the corresponding artist.</p>

<p>I've assigned the correct JSON fields to the matrix, but I'm not sure how to connect each album with the existing artist – adding the artist Title field or title slug in FeedMe doesn't do the job.</p>

<p>What am I missing?</p>

<p>Here is a sample JSON structure:</p>

<pre><code>{  
  "title":"Milyakburra",
  "url_title":"milyakburra",
  "album_artist_relate":[  
     {  
        "entry_id":"2590",
        "title":"Emily Wurramara",
        "url_title":"emily-wurramara"
     }
  ],
  "album_release_date":"2018-06-01",
  "album_description":"",
  "album_tracks_1":"Lady Blue\nMilyakburra\nNgarrikwujeyinama\nCarry Me Home\nBlack Smoke\nLullaby\nHey Love\nTap Sticks\nYimenda-Papaguneray (Turtle Song)\nBlue Moon, Black Sea\nBlack Boy",
  "album_tracks_2":"",
  "album_cover":"/images/uploads/resources/music/emily-wurramura_milyakburra.jpg",
  "album_fishpond_link_id":"",
  "album_amazon_link_id":"",
  "album_itunes_link_album_name":"milyakburra/1388866633"
},
</code></pre>

<p><strong>Edit:</strong>
It looks like FeedMe has difficulties finding a match between a musician entry's <code>title</code> field and the <code>album_artist_relate</code> title field. If I manually add a new title field at the top of the structure (and rename the existing one to "title2") FeedMe correctly inserts the data into the matrix.</p>

<matrix><import><plugin-feedme>
FeedMe: How to import data into the Matrix field of a section?
# FeedMe: How to import data into the Matrix field of a section?

(Asked by: username_0 on 2018-08-05)

I have a section called "Musicians" which is already set up and populated.
It has an unpopulated "Albums" Matrix field which will hold each artist's albums.
I have exported the albums as a separate JSON file. Now I like to import them into the existing "Musicians" section's Matrix field.
But my three test album entries fail to get added to the corresponding artist.
I've assigned the correct JSON fields to the matrix, but I'm not sure how to connect each album with the existing artist – adding the artist Title field or title slug in FeedMe doesn't do the job.
What am I missing?
Here is a sample JSON structure:
{  
  "title":"Milyakburra",
  "url_title":"milyakburra",
  "album_artist_relate":[  
     {  
        "entry_id":"2590",
        "title":"Emily Wurramara",
        "url_title":"emily-wurramara"
     }
  ],
  "album_release_date":"2018-06-01",
  "album_description":"",
  "album_tracks_1":"Lady Blue\nMilyakburra\nNgarrikwujeyinama\nCarry Me Home\nBlack Smoke\nLullaby\nHey Love\nTap Sticks\nYimenda-Papaguneray (Turtle Song)\nBlue Moon, Black Sea\nBlack Boy",
  "album_tracks_2":"",
  "album_cover":"/images/uploads/resources/music/emily-wurramura_milyakburra.jpg",
  "album_fishpond_link_id":"",
  "album_amazon_link_id":"",
  "album_itunes_link_album_name":"milyakburra/1388866633"
},

Edit:
It looks like FeedMe has difficulties finding a match between a musician entry's title field and the album_artist_relate title field. If I manually add a new title field at the top of the structure (and rename the existing one to "title2") FeedMe correctly inserts the data into the matrix.

**Tags:** matrix, import, plugin-feedme

---

## 1 answers

### Answer by username_0 on 2018-08-06. Score: 1

It seems that FeedMe cannot process such JSON objects as it needs them to be cleaner. 
I ended up doing a lot of PHP processing of my exported data until it had the below format. With that FeedMe was happy.
{  
  "title":"Emily Wurramara",
  "album":[  
     {  
        "album_release_date":"2017-02-08",
        "album_description":"",
        "album_tracks_1":"Hey Love",
        "album_tracks_2":"",
        "album_cover":"emily-wurramura_hey-love.jpg",
        "album_amazon_link_id":"",
        "album_itunes_link_album_name":"hey-love-single/1203932967",
        "album_title":"Hey Love (Single)"
     },
     {  
        "album_release_date":"2017-02-22",
        "album_description":"",
        "album_tracks_1":"Hey Love Me Too",
        "album_tracks_2":"",
        "album_cover":"emily-wurramura_hey-love.jpg",
        "album_amazon_link_id":"",
        "album_itunes_link_album_name":"hey-love-single/1203932967",
        "album_title":"Hey Love (Me Too)"
     }
  ]
},


---

