$arrayIndexOf
$arrayIndexOf
will return the index of the first found item of the query.
Usage
$arrayIndexOf[name;query]
Parameters
Field | Type | Description | Required |
---|---|---|---|
name | string | Array name. | true |
query | string | The element we will be queering for every element inside the array. | true |
Example(s)
1client.command({2 name: "arrayIndexOf",3 code: `4 $arrayIndexOf[array;akarui]5 $createArray[array;aoi.js;akarui;documents;bot]6 `7 // It will return "2" as the word "akarui" is in the 2nd position of the array.8});