mirror of
https://github.com/fluencelabs/jsonpath
synced 2025-04-25 09:22:19 +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"
|
|
}
|
|
]),
|
|
);
|
|
} |