bag_merge()bag_merge()
将 dynamic
属性包合并到合并了所有属性的 dynamic
属性包中。Merges dynamic
property-bags into a dynamic
property-bag with all properties merged.
语法Syntax
bag_merge(
bag1,
bag2[
, *bag3*, ...])
bag_merge(
bag1,
bag2[
, *bag3*, ...])
参数Arguments
- bag1...bagN:输入
dynamic
属性包。bag1...bagN: Inputdynamic
property-bags. 该函数接受 2 到 64 个参数。The function accepts between 2 to 64 arguments.
返回Returns
返回 dynamic
属性包。Returns a dynamic
property-bag. 来自合并所有输入属性包对象的结果。Results from merging all of the input property-bag objects. 如果一个键出现在多个输入对象中,则将(从此键的可能值中)选择一个任意值。If a key appears in more than one input object, an arbitrary value (out of the possible values for this key) will be chosen.
示例Example
表达式:Expression:
print result = bag_merge(
dynamic({'A1':12, 'B1':2, 'C1':3}),
dynamic({'A2':81, 'B2':82, 'A1':1}))
resultresult |
---|
{{ "A1":12,"A1": 12, "B1":2,"B1": 2, "C1":3,"C1": 3, "A2":81,"A2": 81, "B2":82"B2": 82 }} |