Arrays

This demo covers the Tripous array helper functions. They provide small operations for array-like values, list mutation, cloning, sorting, filtering, predicates, transforms, and simple grouping.

The list mutation helpers modify the array passed to them. Sort also works in place. Filter, predicate, transform, where, distinct, first, and group helpers return new values.

Array-like values and mutation

Convert array-like browser values, check ranges and membership, insert/remove items, clear lists, and clone arrays.

Sort and filter

tp.ListSort() sorts by multiple fields. tp.ListFilter() filters by tp.FilterInfo and tp.FilterOp definitions.

Predicates and transforms

Use tp.Any(), tp.All(), tp.Transform(), tp.Distinct(), tp.Where(), tp.WhereAll(), and tp.FirstOrDefault().

Grouping

tp.GroupBy() creates a node tree from an array of objects. Each node has a key, child nodes, and optionally a data list.