var dictionary = {"val1": ["arr1", "arr2"], "val2": ["arr3", "arr4"]}
var addNew = ["arr5", "arr6"]
dictionary["Val3"] = AddNew
I would like to write a function to add another arr value into an array. For example: "val1": ["arr1", "arr2", "arr7]
But whatever I tried it's not working. I am new and I hope somebody can help me.
dictionary.val1.push("arr7")dictionary.val1.push("arra7")anddictionary.val3 = addNew(not AddNew) should do what you want.