merging nested collections into the resulting object