Is it possible to use data-bind: foreach
for more than one array?
For example:
<div data-bind="foreach: arrayone, arraytwo">
//do stuff
</div>
If it's possible, what is the correct syntax for it ? Or what is the correct way of doing this (besides merging the two arrays) ?
I don't think there is any official way of doing so, but a workaround would be, to use
$index
along withforeach
on the longer array. Something like this: