I'm executing a MongoDB script via the Kohana MangoDB ORM.
Here's the code to be executed:
var query {
date: date
};
var indexes = db.organisation_booking_indexes.find(query);
If I do .findOne(query)
I get the specific result as an array. However just doing .find(query)
returns other stuff like _mongo
and _db
instead of an array of the expected results.
How do I return just the documents I'm looking for?