I have a template (X), which shows another template (Y) several times using Collection.find(). Inside template Y, I can call functions that return stuff like Y._id and Y.data. However, I need to print Y.array[], and I do so doing
{{#each arr}}
<button type="submit" id="confirm" value="{{userId}}">Confirm</button>
<button type="submit" id="confirm" value="{{userId}}">Confirm</button>
{{/each}}
Outside of this code, I can access Y's data just fine, but when I'm in this each loop, this starts referring to the current array element. How can I get the _id of Y for the button click (as I need both that ID and an ID inside an array of Y for the function that the buttons call)? Or is there a better way to approach this?
{{../_id}}will return the ID of the parent object, which in this case would beY._id- Brian Shamblen