bag_remove_keys()bag_remove_keys()

dynamic 属性包中删除键和关联的值。Removes keys and associated values from a dynamic property-bag.

语法Syntax

bag_remove_keys(bag, keys)bag_remove_keys(bag, keys)

参数Arguments

  • bagdynamic 属性包输入。bag : dynamic property-bag input.
  • keysdynamic 数组包含要从输入中删除的键。keys : dynamic array includes keys to be removed from the input. 键指的是属性包的第一级。Keys refer to the first level of the property bag. 不支持在嵌套级别上指定键。Specifying keys on the nested levels isn't supported.

返回Returns

返回不带指定键及其值的 dynamic 属性包。Returns a dynamic property-bag without specified keys and their values.

示例Example

datatable(input:dynamic)
[
    dynamic({'key1' : 123,     'key2': 'abc'}),
    dynamic({'key1' : 'value', 'key3': 42.0}),
]
| extend result=bag_remove_keys(input, dynamic(['key2', 'key4']))
inputinput resultresult
{{
"key1":123,"key1": 123,
"key2": "abc""key2": "abc"
}}
{{
"key1":123"key1": 123
}}
{{
"key1": "value","key1": "value",
"key3":42.0"key3": 42.0
}}
{{
"key1": "value","key1": "value",
"key3":42.0"key3": 42.0
}}