merging of arrays of nested objects

This is a similar change to what was suggested in issue #7, so it should be able to close out that issue.