Working with Person Group column is a common task in SharePoint development. The following illustrates how to update a single and multiple values to SharePoint person group column.
Insert / Update Single Value SharePoint Person Group Column (People Field)
Tip: For single value, you should refer to the person or group by ID.
listitem.set_item("Column Name", user);
Insert / Update Multi Value SharePoint Person Group Column (People Field)
Tip: For multiple users, you need to refer to it by login name.
*listitem: This is the list item you need to manipulate. If you are inserting an item, this will be created using
ListItemCreationInfo and if you are updating an item, this will be a reference to the item you seek.