Привет, я пытаюсь получить данные с диапазоном между field_1 и field_2, но он всегда возвращает нуль
здесь мой код
let limit = 10;
let skip = 0;
let conditions = {
depth_1 : {"$gte" :parseInt(req.body.depth_1)},
depth_2 : {"$lte" :parseInt(req.body.depth_2)}
}
let showImage = await Image.find(conditions).limit(limit).skip(skip).exec(function(err, docs){
res.send(docs)
этот код всегда возвращает ноль, даже если у меня есть эти данные в моемдБ
мои данные JSON:
[
{
"mode": "W",
"_id": "5bd3e4890ec2f91a7d9309e9",
"filename": "VH009_15.95-20.95_W.png.png",
"path": "/home/harisman/dugong/H/bismillah/public/images/VH009_15.95-20.95_W.png.png",
"hold_id": "VH009",
"depth_1": 1595,
"depth_2": 2095,
"__v": 0,
"createdAt": "2018-10-27T04:07:37.785Z",
"updatedAt": "2018-10-27T04:07:37.785Z"
}
]
мое требование:
{
"depth_1" : 1595,
"depth_2" : 2095
}