mapTree
Recursively transform all values in a nested structure (objects and arrays) by applying a transformer function. Walks the entire tree depth-first.
data(required): nested object or array to traversetransformer(required): lambda(value, path) -> newValue
utlx
// Input: {a: "hello", b: {c: "world"}}
// Uppercase all string values, no matter how deeply nested
{
result: mapTree($input, (v, p) ->
if (typeOf(v) == "string") upperCase(v) else v
)
// {a: "HELLO", b: {c: "WORLD"}}
}