Data Merging
Write a function that merges multiple objects or data rows that belong to the same entity. Combine properties from different sources into a single object.
Examples
Input: [{"id":1,"name":"Alice"},{"id":1,"email":"alice@test.com"}]
Output: {"id":1,"name":"Alice","email":"alice@test.com"}
Input: [{"a":1},{"b":2},{"c":3}]
Output: {"a":1,"b":2,"c":3}
Hints
Start with an empty result object.
Iterate through each row and merge its properties into the result.
For each key in the current row, add it to the result (later rows override earlier values).
Data Merging
Implement a function to merge rows of data belonging to the same user.