retainAll

open fun retainAll(@NonNull collection: Collection<out Any>): Boolean

Remove all objects not in the specified collection.

Return

Whether at least one object not in the specified collection was found in the JSON array and removed.

Parameters

collection

The collection.

Throws

The JSON array is not mutable.