getContainerItemName(target, key, callback)
Obtains the name of the container item if a unique key is present in the container data.
Returns
The name of the container item as a string.
Parameters
Name | Type | Description | Required |
target | string | The target container whose data is searched. | ✅ |
key | string | The unique key that is searched for in the container data. | ✅ |
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 searches for the R-1234
key in the
app/primary
container and obtains the resulting container
item’s name.
PCore.getContainerUtils().getContainerItemName('app/primary', 'R-1234');
Previous topic getContainerData(target) Next topic getContainerItems(target)