Accessing outer loop element from inner loop in JS part


hi everyone,
i am confused in one logic here.
if i am using mutiple each lops and want to excess oouter loop element in the iunner loop is this posible. i have used {{…/entry1}}. this works great with Blaze but is there a way i can excess this value in js part.
let me explain a bit deeper with help of a exaple.

{{#each loop1}}
  {{#each loop2}}

loop1 returns 3 entry;
age = 24
gender = ‘male’

loop2 returns 3 entry
mobile= '1123456789’
dob = ‘12 feb 2017’

     var a1 =;
 // a1 is going to return 'kakz', i want to access 'akhilesh'  and other entries in same table. Accessing values of outer loop  in inner loop.  

What if i user more than two each loops? Is there any method we can still access values in blaze and JS.

thanks for anyone who is gonna put any effort here. last time when i got stuck in such problem @jamgold helped me . so thanks to him and if he can help me here, i will be greatfulll.


I think this might work

{{#each l1 in loop1}}
  {{#each l2 in loop2}}
          {{helper_function_that_returns_value l1 l2}}


Yeah this is exactly why the Blaze Guide recommends using {{#each _ in _ }} by default


Thanks @jamgold And @coagmano for replying. the answer was helpfull. Got what i was looking for.