Merge the list of objects into one and include a type attribute.