Lists/Arrays

Properties

index

Return the index in the list of the first item whose value is x. It is an error if there is no such item.

 

{ }
[{"paths":[],"data":{"call":"list\/array.index","list\/array":"list\/array","list\/array.index":"index","uuid":"071651f79538c5be3173b651cc9bcb7e","args":{"list":["a","long","time","ago","in","a","galaxy","far,","far","away","..."],"value":"ago"},"height":32,"width":120,"step":"Find item index in list","data_to_var":"index","y":0,"x":0,"type":"library","maxpaths":1}}]

Example Response

{"index":3}

count

Return the number of times x appears in the list.

 

{ }
[{"paths":[],"data":{"call":"list\/array.count","list\/array":"list\/array","list\/array.count":"count","uuid":"071651f79538c5be3173b651cc9bcb7e","args":{"list":["a","long","time","ago","in","a","galaxy","far,","far","away","..."],"value":"a"},"height":32,"width":120,"step":"Count 'a's in list","data_to_var":"count","y":0,"x":0,"type":"library","maxpaths":1}}]

Example Response

{"count":2}