Removes the items from the passed data which match the passed condition.


data any

The data tree.

subItemsField any

The field which points to the subitems collection of each data item.

condition any

A function that will be executed for each data item in the tree data and the items for which returns true will be removed.


any[] - The new data tree.