mongodb - Sorting in Loopback Connector Mongo -
i'm having real issue. i'm trying query, limit, sort, etc. i'm doing:
mymodel.find( { where: { "location": { "near": { "lat": "80", "lng": 80 }} }, { limit: 50, offset: 0, skip: 10, sort: { "name": "asc" } }, function(err, docs) { var retval = docs || []; return cb(null, retval); });
what magic sauce limit, skip, , sort?
any appreciated. thanks
mymodel.find( { where: { "location": { "near": { "lat": "80", "lng": 80 }}}, limit: 50, offset: 0, skip: 10, order: "name asc" }, function(err, docs) { var retval = docs || []; cb(null, retval); });
i think way should look. try reading , documentation under it: https://docs.strongloop.com/display/public/lb/querying+data
Comments
Post a Comment