@dan When I create children by array like this
userChildren = [{id: 'id', name: 'name', dateOfBirth: '2010-01-01'}]
await axios.patch(
`${config.iamHost}/api/user/${session.userId as string}`,
{
user: {
email: session.user!.email!,
data: {
children: userChildren,
},
},
},
{
headers: {
"X-FusionAuth-TenantId": config.iamTenantId,
Authorization: config.iamApiKey,
},
}
);
The code above did change the user custom data to
children.id id
children.name name
etc
I think because I didn't put the properties in the double quote as you did.
So I have found a workaround, which is parsing it as a JSON string and later parsing it back.
data: {
children: JSON.stringify(userChildren),
},