Displaying data to dynamic pages

Hi Yanis - perhaps a little more context is needed then.

Is this code running on a dynamic page?

Basically your query will load every Contact in your dataset (limited to a page size that defaults to 20) so you will need to filter it somehow using something like the logged in user information from wixMembers.

At the moment your query will load multiple contact records (try changing your console.log() to console.log(items retrieved: ${results.length}) to see how many).

What this means is that your map function will assign the firstName of each record to the same element finishing with the last record in the items list.

So in order to help you further you need to share what the page knows about when it loads.

Is the user logged in?
What user information do you keep in your Contacts data collection?
Why aren’t you using the membership data instead of your own (or is that a bad assumption on my part)?

Cheers