For example, given the following structure
pages = [ [ { myvar: 1}, { myvar: 2}, { myvar: 3}, ] ];
How can I express understanding (python-like)?
v.myvar for p in pages for v in p
AFAIK, you cannot see: https://github.com/jashkenas/coffee-script/issues/1191
Workaround in the meantime (until CoffeeScript improves):
pages = [ [ { myvar: 1}, { myvar: 2}, { myvar: 3}, ] ]; result = [] for row in pages for map in row result.push map.myvar console.log result
which outputs:
[ 1, 2, 3 ]