getIndex

returns the index of the item by its id

number getIndex(string id);

Parameters

idstringthe id of the item

Returns

numberthe index of the item

Example

var index = component.data.getIndex("1"); // -> returns 0

Back to top