Merge key collision in Javascript object