dynamic queries not working?
opened this issue · comments
Deleted user commented
Hey,
I'm trying to create a dynamic query, but it just doesn't seem to want to work, even though the query I'm generating works when I put it in statically. No errors are being thrown... Everything works except the dynamic query.
query = {};
for(i in selected) {
if(selected.hasOwnProperty(i)) {
var terms;
if(selected[i].indexOf(',') >= 0) {
terms = {$all: selected[i].split(',')};
} else {
terms = selected[i];
}
}
query[i] = terms;
}
result = this.collection.query(query);
console.log(result);
Dave Tonge commented
Hi, please can you re-open this issue if you are still having it.
Thanks