Regarding this.capital is undefined in mongodb

From: Giridhar Bhageshpur <giridharb54@xxxxxxxxx>
To: mongodb-user <mongodb-user@xxxxxxxxxxxxxxxx>
Date: Wed, 13 Apr 2016 18:25:02 -0700 (PDT)
Why ads?
Hi all,

       I was running this query 
      
 db.world.find({"$where":"this.capital.match('^'+this.name+'.+$')"},{"name":1,"capital":1,"_id":0}) 
on mongo shell. I got the error "TypeError: this.capital is undefined" 
Please let me know how to resolve this

thnx,
Giridhar

-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.org/manual/support/
--- 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/158a325e-cb62-4ee0-bafc-e07f478a7406%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Why ads?