Get entries with range?

fetch('/api/collections/get/posts?token=xxtokenxx', {
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
        filter: {
             $and: [
               {myfield: {$gt: x}},
               {myfield: {$lt: y}}
             ]
        }
    })
})
.then(res=>res.json())
.then(res => console.log(res));
1 Like