Hi @hlopez!
Here’s some general direction for accessing specific item data while using Repeat for Each:
When using Repeat For Each, you can include camel-cased “Item” appended to the name of the array you’re looking in. For example, let’s say you have an array of objects that represent each card:
state.cards = [{...data}]
Inside of Builder, you can now use state.cardsItem.id
to look for the id
value data for the current item in the “Repeat for Each”.
If this doesn’t get you headed in the right direction, please feel free to respond with some clarification regarding your tech stack and show the shape of the data you’re working with!
Regarding the custom Javascript section, are you using the one under Data > “Custom JS + CSS”?
When console logging, you’ll want to make sure your code is in the if(Builder.isBrowser)
section of the JS panel. Then, to see your console log in action, head to your site preview. (The eye button next to “Publish”!).
Thank you for these questions!