I created a local minimongo collection & I want to compare each item in the collection to all the other items (combination, not permutation). If it were an array, it'd look like this:
for (var i = 0; i < coordCount - 1; i++) {
for (var j = i + 1; j < coordCount; j++) {
console.log(i,j);
}
}
Is this possible with minimongo? My first thought was to use hasNext()
and next()
but those don't exist. Then I thought I could aggregate
and group on unique combinations, but that doesn't exist on the client either.