mirror of
https://github.com/fluencelabs/jsonpath
synced 2025-06-23 21:01:38 +00:00
Bracket notation after recursive descent does not recurse #40
This commit is contained in:
@ -216,3 +216,38 @@ fn array_multiple_key() {
|
||||
json!(["blue", "Leonor Herman"]),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn bugs40_bracket_notation_after_recursive_descent() {
|
||||
setup();
|
||||
|
||||
select_and_then_compare(
|
||||
"$..[0]",
|
||||
json!([
|
||||
"first",
|
||||
{
|
||||
"key": [
|
||||
"first nested",
|
||||
{
|
||||
"more": [
|
||||
{"nested": ["deepest", "second"]},
|
||||
["more", "values"]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]),
|
||||
json!([
|
||||
"first",
|
||||
"first nested",
|
||||
{
|
||||
"nested" : [
|
||||
"deepest",
|
||||
"second"
|
||||
]
|
||||
},
|
||||
"deepest",
|
||||
"more"
|
||||
]),
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user