Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this article
Applies to: ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Determines whether the specified set contains the specified element.
set_has_element(
set,
value)
Learn more about syntax conventions.
Name | Type | Required | Description |
---|---|---|---|
set | dynamic |
✔️ | The input array to search. |
value | ✔️ | The value for which to search. The value should be of type long , int , double , datetime , timespan , decimal , string , guid , or bool . |
true
or false
depending on if the value exists in the array.
print arr=dynamic(["this", "is", "an", "example"])
| project Result=set_has_element(arr, "example")
Output
Result |
---|
true |
Use array_index_of(arr, value)
to find the position at which the value exists in the array. Both functions are equally performant.