fixed javascript error where I wasn't putting objects into the array and had key value pairs.