mirror of
https://github.com/fluencelabs/jsonpath
synced 2025-04-26 01:42:14 +00:00
34 lines
591 B
Rust
34 lines
591 B
Rust
|
#[macro_use]
|
||
|
extern crate serde_json;
|
||
|
|
||
|
use common::{select_and_then_compare, setup};
|
||
|
|
||
|
mod common;
|
||
|
|
||
|
#[test]
|
||
|
fn extended_filter_in() {
|
||
|
setup();
|
||
|
|
||
|
select_and_then_compare(
|
||
|
"$..[?(@.size in ['M', 'L', 0])]",
|
||
|
json!({
|
||
|
"red" : {
|
||
|
"size": "M"
|
||
|
},
|
||
|
"blue" : {
|
||
|
"size" : "L"
|
||
|
},
|
||
|
"yellow" : {
|
||
|
"size" : "XL"
|
||
|
}
|
||
|
}),
|
||
|
json!([
|
||
|
{
|
||
|
"size" : "M"
|
||
|
},
|
||
|
{
|
||
|
"size" : "L"
|
||
|
}
|
||
|
]),
|
||
|
);
|
||
|
}
|