<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Custom user data as array?]]></title><description><![CDATA[<p dir="auto">I want to add children's data to the user, but I don't need the child's email, etc.</p>
<p dir="auto">I need only the child's name, date of birth, and the UUID which should be generated automatically, so I choose to use the custom user data.</p>
<p dir="auto">But a user can have many children and the FusionAuth custom user data does not allow me to create an array object <img src="https://fusionauth.io/community/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=rcgg4tg866g" class="not-responsive emoji emoji-android emoji--disappointed" style="height:23px;width:auto;vertical-align:middle" title=":(" alt="😞" /></p>
<p dir="auto">How could I achieve this with FusionAuth?</p>
]]></description><link>https://fusionauth.io/community/forum/topic/1456/custom-user-data-as-array</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Mar 2026 05:32:47 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/1456.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 10 Jan 2022 04:33:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Custom user data as array? on Thu, 27 Jan 2022 00:58:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/1252">@minhngocnguyenduy</a> Glad you found a solution!</p>
]]></description><link>https://fusionauth.io/community/forum/post/4274</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/4274</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Thu, 27 Jan 2022 00:58:09 GMT</pubDate></item><item><title><![CDATA[Reply to Custom user data as array? on Wed, 12 Jan 2022 00:55:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/20">@dan</a> When I create children by array like this</p>
<pre><code>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,
          },
        }
      );
</code></pre>
<p dir="auto">The code above did change the user custom data to</p>
<pre><code>children.id id
children.name name
etc
</code></pre>
<p dir="auto">I think because I didn't put the properties in the double quote as you did.</p>
<p dir="auto">So I have found a workaround, which is parsing it as a JSON string and later parsing it back.</p>
<pre><code>data: {
   children: JSON.stringify(userChildren),
},
</code></pre>
]]></description><link>https://fusionauth.io/community/forum/post/4183</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/4183</guid><dc:creator><![CDATA[minhngocnguyenduy]]></dc:creator><pubDate>Wed, 12 Jan 2022 00:55:22 GMT</pubDate></item><item><title><![CDATA[Reply to Custom user data as array? on Tue, 11 Jan 2022 02:26:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/56">@maciej-wisniowski</a> You should be able to create an array object.</p>
<p dir="auto">Here's a data object which should work:</p>
<pre><code>data: {
  children: [ {
    "name": "foo"
     "value": "bar"
  } ],
}
</code></pre>
<p dir="auto">Can you please print out the JSON of the object you are trying to store in the user.data field and share it?</p>
]]></description><link>https://fusionauth.io/community/forum/post/4178</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/4178</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Tue, 11 Jan 2022 02:26:01 GMT</pubDate></item><item><title><![CDATA[Reply to Custom user data as array? on Mon, 10 Jan 2022 19:27:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/1252">@minhngocnguyenduy</a> maybe using <a href="https://fusionauth.io/docs/v1/tech/lambdas/" rel="nofollow ugc">lambdas</a> can help?</p>
]]></description><link>https://fusionauth.io/community/forum/post/4174</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/4174</guid><dc:creator><![CDATA[maciej.wisniowski]]></dc:creator><pubDate>Mon, 10 Jan 2022 19:27:14 GMT</pubDate></item></channel></rss>