Jongo + JS var

16 views
Skip to first unread message

Ruggiero Delicio

unread,
Jun 6, 2016, 5:20:09 AM6/6/16
to Jongo
Hi,

I want to pass a declaration of variables(JS) like I do using shell. Is it possible?(I'm a newbie)

var today = new Date();
var yesterday = new Date();
yesterday
.setDate(today.getDate() - 1);
db
.databaseName.find({
    insDate
:{$gte:yesterday}
});

I'm looking for a method for the declaration of variables within query without passing them as parameters.

Thank you,
Ruggiero

Reply all
Reply to author
Forward
0 new messages