How can I get the parent $value on a nested {{each}}? I would prefer a “direct” solution, without having to create a 2nd template, and use it from the first one.
How can I get the parent $value on a nested {{each}} ? I would
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can just do this:
${ parentItem.Name }, if the parent item was calledparentItemand the desired member variable was calledName. Here is an example, based loosely on the movie example in the jQuery API docs for{{each}}:Template:
Data (only one item for this example):
Result:
In this example, the inner
{{each}}is getting values from:{{each}}with${edition.Name}${$data.Name}