<p>You should nest the <em>child</em>'s details like so:</p>

<pre><code>{
    "data": [
        {
            "title": "secrets",
            "import_id": "UUID-9-3/4",
            "child": {
                "child_title": "Harry Potter",
                "child_message": "Is in a dream"
            }
        }
    ]
}
</code></pre>

<p>Then make sure you you choose <code>data</code> as your <strong>Primary Element</strong> when mapping your feed and check <strong>Create entries if they do not exist</strong> for the relational field.</p>

CC BY-SA 4.0
2020-05-01T10:24:03.990Z
2020-05-01T10:24:03.990Z
Oli
<p>According to the CraftCMS <a href="https://docs.craftcms.com/feed-me/v4/content-mapping/field-types.html#inner-element-fields" rel="nofollow noreferrer">FeedMe 4 docs</a> we should be able to import inner element field data when importing content via FeedMe. </p>

<p>I have a section we'll call <code>Parent</code>, which has two fields that need importing; <code>ImportId</code> (text field) and <code>ChildEntry</code> (Entry relationship). Child Entry has two fields, Title and Body. </p>

<p>I am able to map <code>Parent-&gt;ImportId</code> and <code>ChildEntry-&gt;Title</code> I am unable to map to <code>ChildEntry-&gt;Body</code>.</p>

<p><em>My JSON looks like this:</em></p>

<pre><code>
{
  "data": [
    {
      "title": "secrets",
      "import_id": "UUID-9-3/4",
      "child_title": "Harry Potter",
      "child_message": "Is in a dream",
    },
    ...
  ]
}
</code></pre>

<p>Is this expected functionality, or am I reading the documentation correctly? </p>

CC BY-SA 4.0
2019-04-16T09:19:37.343Z
What type of field is ChildEntry->Body? Could it be that this is not a text field (but a Matrix field for instance), and therefore FeedMe can not use it for import?
Paul
CC BY-SA 4.0
2019-04-18T12:54:10.710Z
It's a rich text field.
Philip Zaengle
CC BY-SA 4.0
2020-04-26T11:11:01.650Z
This should work, I just did that recently. Would you share a bit more Information? Maybe a Screenshot of the current Setup?
Max Strebel
<plugin-feedme>
FeedMe Inner field mapping
# FeedMe Inner field mapping

(Asked by: username_0 on 2019-04-11)

According to the CraftCMS FeedMe 4 docs we should be able to import inner element field data when importing content via FeedMe. 
I have a section we'll call Parent, which has two fields that need importing; ImportId (text field) and ChildEntry (Entry relationship). Child Entry has two fields, Title and Body. 
I am able to map Parent->ImportId and ChildEntry->Title I am unable to map to ChildEntry->Body.
My JSON looks like this:

{
  "data": [
    {
      "title": "secrets",
      "import_id": "UUID-9-3/4",
      "child_title": "Harry Potter",
      "child_message": "Is in a dream",
    },
    ...
  ]
}

Is this expected functionality, or am I reading the documentation correctly?

**Tags:** plugin-feedme
> **Comments:**
> **username_1**: What type of field is ChildEntry->Body? Could it be that this is not a text field (but a Matrix field for instance), and therefore FeedMe can not use it for import?  
> **username_0**: It's a rich text field.  
> **username_2**: This should work, I just did that recently. Would you share a bit more Information? Maybe a Screenshot of the current Setup?  

---

## 1 answers

### Answer by username_3 on 2020-05-01. Score: 2

You should nest the child's details like so:
{
    "data": [
        {
            "title": "secrets",
            "import_id": "UUID-9-3/4",
            "child": {
                "child_title": "Harry Potter",
                "child_message": "Is in a dream"
            }
        }
    ]
}

Then make sure you you choose data as your Primary Element when mapping your feed and check Create entries if they do not exist for the relational field.


---

