✨ updates
This commit is contained in:
parent
77185abd6a
commit
b1ad069731
4 changed files with 114 additions and 8 deletions
|
@ -2,7 +2,8 @@ use jsonfilter::{try_matches, FilterError};
|
|||
use serde_json::{json, Value};
|
||||
|
||||
fn main() {
|
||||
let filter = json!({"$and": [{"age": {"$gte": 18}}, {"age": {"$lte": 30}}]});
|
||||
let filter = json!({"age": { "$range": [18, 30] }}); // same as:
|
||||
// let filter = json!({"$and": [{"age": {"$gte": 18}}, {"age": {"$lte": 30}}]});
|
||||
|
||||
let obj1 = json!({"name": "John Doe", "age": 25});
|
||||
let obj2 = json!({"name": "Alice Smith", "age": 35});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue