1

I am using lokijs to create a database, db represents the database of lokijs in the code below:

var users;
db.loadDatabase({},function(){
    users=db.getCollection('users');
});
var result=users.find({'city':{'$contains':searCon.username}});
var obj=result.where(function(uu){return uu.username == 'admin123'; });

But I get the following error:

TypeError: result.where is not a function

var obj=result.where(function(uu){return uu.username == 'admin123'; });
Jens Baitinger
  • 2,230
  • 14
  • 34
faryang
  • 55
  • 6
  • 1
    The reason why 1 rep users are not allowed to embed images is to prevent them from embedding code or error screenshots. So please type the error as text not an image. I am giving you -1 until then. – Tomáš Zato Jan 18 '16 at 11:37

0 Answers0