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.
Switch services using the Version drop-down list. Learn more about navigation.
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Enumerates all the root keys in a dynamic property bag object.
Syntax
bag_keys(object)
Learn more about syntax conventions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| object | dynamic |
✔️ | The property bag object for which to enumerate keys. |
Returns
An array of keys, order is undetermined.
Examples
datatable(index:long, d:dynamic) [
1, dynamic({'a':'b', 'c':123}),
2, dynamic({'a':'b', 'c':{'d':123}}),
3, dynamic({'a':'b', 'c':[{'d':123}]}),
4, dynamic(null),
5, dynamic({}),
6, dynamic('a'),
7, dynamic([])
]
| extend keys = bag_keys(d)
Output
| index | d | keys |
|---|---|---|
| 1 | { "a": "b", "c": 123 } |
[ "a", "c" ] |
| 2 | { "a": "b", "c": { "d": 123 } } |
[ "a", "c" ] |
| 3 | { "a": "b", "c": [ { "d": 123 } ] } |
[ "a", "c" ] |
| 4 | ||
| 5 | {} | [] |
| 6 | a | |
| 7 | [] |