I'm wondering if it is possible to iterate a multi-dimensional array, in Node.js I'm returning an array that has an object inside of it, and I'm putting it into an array so that I can push to it, but when it is all done pushing, I'm left with something like
[ [
{
stuff: stuff
}
],
[
{
stuff: stuff
}
]
]
I tried
each item in items
p= item
which returns [object Object]
When I try
each item in items
p= item.invdescription
I get an error, any idea how I can do such a thing with Jade? Thanks!
Basically:
for (var i = 0; i < items.length; i += 1) {
p= items[0][i].invdescription
}
if items
is having the value
[ [
{
stuff: stuff
}
],
[
{
stuff: stuff
}
]
]
then you can iterate over the stuff
values in jade via
each item in items
p #{item[0].stuff}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With