pub fn doc_len(path: &Path, selector: &str) -> Result<usize>Expand description
Count items in an array or object at a selector path (items, database).
Empty / "." means the document root. A scalar (or other non-container)
is [crate::exit::TypeErrorError]. A missing selector is
[crate::exit::NoMatchError]. A wildcard or predicate (items[*]) is
[crate::exit::AmbiguousError] even on 0 or 1 match, and names
items[0] / items[1]. A missing file peels as not_found.