Best Approach to update docs with multiple Array of objects


#1

if one has a doc which lets say has multiple arrays of object lets say i have a lead which can have one or more contact objects and the contact has array of phone, email and social media. How does one go about updating
the main items without losing the array’ on upsert. I was thinking of doing a subdoc update but there i have to deal with limit of 16 fields if i don’t want to replace whole object which would overwrite my arrays. So i am thinking about checking if i have more then 16 fields to update and then brake it into multiple updates or to create multiple objects in my doc so i can update them as one object like Name , group the together, that way i can just update the name object which will hold fname, mname, lname, title and suffix.
So hopefully someone can share best approach for something like this