Muokkaa

Jaa


bag_merge()

Applies to: ✅ Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

The function merges multiple dynamic property bags into a single dynamic property bag object, consolidating all properties from the input bags.

Syntax

bag_merge(bag1,bag2[,*bag3*, ...])

Learn more about syntax conventions.

Parameters

Name Type Required Description
bag1...bagN dynamic ✔️ The property bags to merge. The function accepts between 2 to 64 arguments.

Returns

A dynamic property bag containing the merged results of all input property bags. If a key is present in multiple input bags, the value associated with the key from the leftmost argument takes precedence.

Example

print result = bag_merge(
   dynamic({'A1':12, 'B1':2, 'C1':3}),
   dynamic({'A2':81, 'B2':82, 'A1':1}))

Output

result
{
"A1": 12,
"B1": 2,
"C1": 3,
"A2": 81,
"B2": 82
}