exists

checks whether the specified item exists in the component

boolean exists(string|number id);

Parameters

idstring|numberthe id of the item in question

Returns

booleantrue if the item exists, otherwise false

Example

var item = component.data.exists("1");

Related samples

Back to top