set_has_element()
Determines whether the specified set contains the specified element.
Syntax
set_has_element(array,value)
Arguments
- array: Input array to search.
- value: Value to search for. The value should be of type
long,integer,double,datetime,timespan,decimal,string,guid, orboolean.
Returns
True or false depending on if the value exists in the array.
Example
print arr=dynamic(["this", "is", "an", "example"])
| project Result=set_has_element(arr, "example")
| Result |
|---|
| 1 |
See also
Use array_index_of(arr, value) to find the position at which the value exists in the array. Both functions are equally performant.
Feedback
Submit and view feedback for