1

I'm using Feed Me to populate content for a "Meetings" section in my site. One of the fields in this section is "Meeting Attendees", which is an entries field relating to a Contacts Section.

I have a JSON file that contains a unique Meeting ID, and this Meeting ID could map to several Contacts. In a simplified form, my JSON file format is essentially this:

[
    {
        "Meeting Title" : "Project Kickoff"
        "Meeting Attendee" : "John Doe"
    },
    {
        "Meeting Title" : "Project Kickoff"
        "Meeting Attendee" : "Jane Smith"
    },
    {
        "Meeting Title" : "Project Kickoff"
        "Meeting Attendee" : "Jim Brown"
    }
]

You'll see in this simplified example that three Contacts need to be related to the "Project Kickoff" Meeting entry. I have my "Meeting Attendees" entries field configured with no limit on number of selectable entries, and can add multiple entries without issue when entering data manually.

However when I run Feed Me on a data set like the one above, Feed Me seemingly overwrites/replaces the entries rather than adding each as a separate relation. e.g. When Feed Me has completed processing the above dataset, my "Project Kickoff" entry will only have one attendee related ("Jim Brown" in this case - or whatever the last value in the dataset happens to be). For the example data above, I would expect to see all three "Meeting Attendees" names related to the "Project Kickoff" meeting entry.

Is there a way to configure either Feed Me or my JSON data to produce the intended result?

2

Why not define the attendees as an array in your JSON? This should allow multiples to be added to your field.

[
    {
        "Meeting Title" : "Project Kickoff"
        "Meeting Attendees" : ["John Doe", "Jane Smith", "Jim Brown"]
    }
]
3
  • Unfortunately the API from which I grab this data isn't controlled by me, but I'll try writing something to pre-process the data prior to import. – Ed Hebert May 19 at 15:29
  • Ah, I didn't realise that. Get someone to rewrite the API! – Andy May 19 at 15:44
  • Andy's method was correct. Once I refactored the JSON feed into the format Andy described, the records came in without issue. – Ed Hebert May 20 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.