We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3eedca commit 02d4d7bCopy full SHA for 02d4d7b
jaq-json/src/lib.rs
@@ -518,7 +518,7 @@ impl Val {
518
}
519
520
521
- /// Return any `key` for which `value | .[key]` is defined.
+ /// Return any `key` for which `value | .[key]` is defined, as well as its output.
522
///
523
/// Return `None` for values that are neither arrays nor objects.
524
fn key_values(&self) -> Option<BoxIter<(Val, &Val)>> {
@@ -530,6 +530,7 @@ impl Val {
530
})
531
532
533
+ /// Return all path-value pairs `($p, $v)`, such that `getpath($p) = $v`.
534
fn path_values<'a>(self, path: Vec<Val>) -> BoxIter<'a, (Val, Val)> {
535
let head = (path.iter().cloned().collect(), self.clone());
536
let f = move |k| path.iter().cloned().chain([k]).collect();
0 commit comments