isContainerItemExists(target, key, callback)
Verifies if a specific item exists in a container.
Returns
The Boolean value true if the item exists in a container.
Parameters
Name | Type | Description | Required |
target | string | The target container to be verified. | ✅ |
key | string | The unique key of the container item to be searched for. | ✅ |
callback | ContainerCallback | The function executed for each unique key in the container item till it returns true, indicating that the key has been found. | ❌ |
Usage example
In this example, the API verifies if the container item with the
R-1234
key exists in the app/primary
container.
PCore.getContainerUtils().isContainerItemExists('app/primary', 'R-1234');
Previous topic isContainerItemActive(target, key, callback) Next topic clearTransientData(transientItemID)