XML child functions not mapping

Edit: I was able to use child functions but I’m still not getting all the data.

It worked two ways:
One, adding a 1 after each function. So, contact-data.1.email-addresses. Two, using array brackets contact-data.email-addresses.

However, it only provides the first item in the array such as Email. It’s closer to a solution but still really limited in the application.

Start of original post:
I’m unable to map any child arrays from the following XML. Each time I add a child function, the output is null. What am I doing wrong?

Here is the data structure from the GET people request in my CRM.

The example above works since I use primary functions. I’d get the

When I use a child function, it produces an Empty output. I’ve checked the raw data name using the mouse rollover.

Here is the input file using a child function.
Input bundle with child function:

[
    {
        "name": "setVariable",
        "scope": "roundtrip",
        "value": [
            null
        ]
    }
]

Any ideas how to figure out what is wrong?

1 Like

Hi @finetune ,
We’ve looked into the issue of not receiving emails. Please try using the following map function

{{map(flatten(map(24.Data.people.person; "contact-data[].email-addresses")); "email"; "first-name"; "John")}}

It seems there was a missing square bracket after contact-data.


Output:

Best regards,

Msquare Automation
Gold Partner of Make
@Msquare_Automation