pub fn length(value: Value, _: HashMap<String, Value>) -> Result<Value> {
    match value {
        Value::Array(arr) => Ok(to_value(&arr.len()).unwrap()),
        Value::String(s) => Ok(to_value(&s.chars().count()).unwrap()),
        _ => Ok(to_value(0).unwrap()),
    }
}
// Returns the number of items in an array or the number of characters in a string.
// Returns 0 if not an array or string.
Returns the number of items in an array or the number of characters in a string.
Returns 0 if not an array or string.
Returns the number of items in an array or the number of characters in a string . Returns 0 if not an array or string .
pub fn length(value: Value, _: HashMap<String, Value>) -> Result<Value> {
    match value {
        Value::Array(arr) => Ok(to_value(&arr.len()).unwrap()),
        Value::String(s) => Ok(to_value(&s.chars().count()).unwrap()),
        _ => Ok(to_value(0).unwrap()),
    }
}
pub fn length ( value : Value , _ : HashMap < String , Value > ) -> Result < Value > { match value { Value :: Array ( arr ) => Ok ( to_value ( & arr . len ( ) ) . unwrap ( ) ) , Value :: String ( s ) => Ok ( to_value ( & s . chars ( ) . count ( ) ) . unwrap ( ) ) , _ => Ok ( to_value ( 0 ) . unwrap ( ) ) , } }
Returns the number of items in an array or the number of characters in a string.
Returns the number of items in an array or the number of characters in a string .
value
HashMap<String, Value>
value
HashMap<String, Value>