-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Description
Dot accessor in the for expression is not working.
Steps to Reproduce
- The following code to be included in the main.rs
use jslt::Jslt;
use serde_json::json;
use std::fs;
fn main() -> Result<(), Box <dyn std::error::Error> > {
let jslt: Jslt = r#"
let val = [2,3,4]
[ for($val)
let x = .
2*. if($x > 3) ]
"#.parse()?;
let input = json!({
"data": [
[1, 2, 3, 4, 5],
[6, 7, 8, 9, 10]
]
});
let output = jslt.transform_value(&input)?;
println!("{}",output);
assert_eq!("[8]",output.to_string());
Ok(())
}
Actual Output
thread 'main' panicked at jslt_dev/jslt/src/transform/value.rs:275:34:
Expected Output
[8]
Environment
Nightly Rust Toolchain
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels