Get data from dataset inside repeater

I have a dataset and want to display its content in a repeater. This works fine without code, but for the name text field, I want to do data.firstName + " " + data.lastName.

When I use the code:

$w("#repeater3").forEachItem(($item, itemData, index) => {
    console.log(itemData)
})

I get no data and only a dictionary with an _id value set. This is not very useful because I cannot set the fields using $item(“text1”).text = itemData.firstName + " " + itemData.lastName;

How do I set this repeater up properly so that itemData shows up properly?

@pranav-patil It’s likely that the dataset is not fully loaded. The same code, called inside of page and dataset onReady event handlers, returns all of the fields and not just the _id value:

$w.onReady(function () {
  $w("#dataset1").onReady(() => {
    $w("#repeater3").forEachItem(($item, itemData, index) => {
          console.log(itemData)
    })      
  })
});

Thank you so much! Yes, I forgot this step.