[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[],[],null,["# Function: map.merge\n\nTakes two maps, creates a copy of the first map, and adds the items from the second map to the copy.\n\nFor maps with the same key, the value from the first map is replaced by the\nvalue from the second map.\n\nFor example, if you have `map1 = {key1: value1}` and `map2 = {key1: value2}`,\n`map.merge(map1, map2)` returns `{key1: value2}`.\n\nArguments\n---------\n\nReturns\n-------\n\nA copy of the first map with items added from the second map.\n\nRaised exceptions\n-----------------\n\nExamples\n--------\n\n### Example 1\n\n```yaml\n# Add items from second map to copy of first map\n# Returns `{\"key1\": \"hello\",\"key2\": \"world\",\"key3\": \"good\",\"key4\": \"morning\"}`\n- init:\n assign:\n - my_map1: {\"key1\": \"hello\", \"key2\": \"world\"}\n - my_map2: {\"key3\": \"good\", \"key4\": \"morning\"}\n- returnStep:\n return: ${map.merge(my_map1, my_map2)}\n```\n\n### Example 2\n\n```yaml\n# For same keys in second map, replace values in copy of first map\n# Returns `{\"key1\": \"good\",\"key2\": \"morning\"}`\n- init:\n assign:\n - my_map1: {\"key1\": \"hello\", \"key2\": \"world\"}\n - my_map2: {\"key1\": \"good\", \"key2\": \"morning\"}\n- returnStep:\n return: ${map.merge(my_map1, my_map2)}\n```"]]