Count() in Lambda?

Options

I have an array of objects that have their own little arrays:

[

{"numbers":[[1],[1,2],[1,2,3]]},

{"numbers":[[4],[4,5],[4,5,6]]}

]

I want to update the objects to include only child arrays with with more than one element so the result would be:

[

{"numbers":[[1,2],[1,2,3]]},

{"numbers":[[4,5],[4,5,6]]}

]

My research says that in Javascript, this is accomplished using count(). So it would look something like:

return $this.numbers.count() >1

But when I run that, it thinks "count" is a field within "numbers".

How do I write the Javascript in Xano's Lambda to count elements within an array?


Thanks!

Tagged:

Comments