this works
Template.kanjifinder.kanjicharacters = function () {
console.log("kanjlist");
return kanji.find({cardid: {$in:[1,2]}}, {sort: {cardid: 1}});
};
but is there a way to replace this hardcoded array [1,2] with a javascript array?
var str = "123456"
var cardids = str.split("");
if (Meteor.isClient) {
Template.kanjifinder.kanjicharacters = function () {
console.log("kanjlist");
return kanji.find({cardid: {$in: **cardids** }}, {sort: {cardid: 1}});
}
};
cardidhere as a test. Ultimately I'll be trying to find Japanese kanji characters instead of the cardid numbers. But I don't want to get bogged down in utf-8 issues for the moment. Basically :cardid: 9 kanji: "中" volume: "Series 2 Volume 1"