function mergeArrays (array1, array2) for k,v in pairs(array2) do array1[k] = v end return array1 end