merge

From Bohemia Interactive Community
Revision as of 16:22, 29 January 2021 by Ansin11 (talk | contribs) (Created page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version 2.04|2.04]]
Hover & click on the images for description

Description

Description:
Merges two HashMaps.
Groups:
HashMap

Syntax

Syntax:
map1 merge map2
Parameters:
map1: HashMap - This HashMap will be modified.
map2: HashMap - All key-value pairs from this HashMap are added to map1. If a key from map2 already exists in map1, then its value is overwritten with the corresponding value from map2.
Return Value:
Nothing

Alternative Syntax

Syntax:
map1 merge [map2, overwriteExisting]
Parameters:
map1: HashMap - This HashMap will be modified.
map2: HashMap - All key-value pairs from this HashMap are added to map1.
overwriteExisting (Optional, default: false): Boolean - If true, keys from map1 that also exist in map2 are overwritten. merge is faster when this parameter is set to true.
Return Value:
Nothing

Examples

Example 1:
_hashMap merge _otherHashMap;

Additional Information

See also:
HashMap

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

[[Category:Introduced with arma3dev version 2.04]][[ Category: arma3dev: New Scripting Commands | MERGE]][[ Category: arma3dev: Scripting Commands | MERGE]]