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

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -