This is how you'd call the function:
Call(Function("GetNestedDocument"), [Ref(Collection("SomeCollection"), "264260207986606612"), 0, 3])
Parameters:
- A
Ref
of a document. - Current depth. Since AFAIK we cannot have default values in
Lambda
we need to pass0
for the first level. - Max depth. The max number of levels the recursive function will go.