mongodb - passing mongo selector in an object -
this meteor client code tries supply template data works when selector written mycol.find({'p':'pen'})
fails return documents when written like:
template.mytemp.helpers({ docs: () => { let element = $('input:not(".inactive")'); let query = {}; let key = element.prop('name'); query[key] = element.val(); return mycol.find(query); //<---- returns no documents ---- } });
i made sure query = {p: 'pin'}
in browser console.
problem , how fix it?
Comments
Post a Comment