I am setting the data of a repeater with $w('#repeater').data = repeaterData;
I'm getting Wix code SDK error: Each item in the items array must have a member named `_id` which contains a unique value identifying the item."
![](https://static.wixstatic.com/media/a27d24_e28f26580fe9497783a1d6d45419236c~mv2.jpg/v1/fill/w_665,h_341,al_c,q_80,enc_auto/a27d24_e28f26580fe9497783a1d6d45419236c~mv2.jpg)
You can see from the debugger that the array has 3 items, and they each have different _id's, 0, 1 and 2.
Please tell me what's going on here.
Hi Mike,
Repeater data is not automatically applied to the elements of repeater items.
You will need to use forEachItem() with the current repeater item index to pull the correct record from the repeater data.
See more information below:
https://www.wix.com/code/reference/$w.Repeater.html#forEachItem
I am trying to loop through a collection and build the repeater dynamically.
Is repeaterData.push(newRepeaterItem); the usual way to do it?
Oh, wow, okay thanks Tomer. Let me get stuck into the code and see what craziness I am doing....
Hi Mike, the second and third items are arrays themselves instead of objects.
I can see how you missed it, took me a few minutes as well ☺️