Skip to main content

retainAll (Function)

Function returns the updated list after retaining all the elements in the specified list.

Syntax

<OBJECT> list:retainAll(<OBJECT> list, <OBJECT> given.list)

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
listThe list that needs to be updated.OBJECTNoYes
given.listThe list with all the elements that needs to retained.OBJECTNoYes

Example 1

list:retainAll(stockSymbols, latestStockSymbols)

This returns the updated list, stockSymbols, after retaining all the values in latestStockSymbols.