This is first time i use people picker. I have no experince with it. I hope that somebody can help me with getting value of people picker to save it in a new item as a person in my hosted list in SharePoint online.
This is my people picker code
function initializePeoplePicker(peoplePickerElementId) {
// Render and initialize the client-side People Picker.
// Create a schema to store picker properties, and set the properties.
var schema = {};
schema['PrincipalAccountType'] = 'User,DL,SecGroup,SPGroup';
schema['SearchPrincipalSource'] = 15;
schema['ResolvePrincipalSource'] = 15;
schema['AllowMultipleValues'] = true;
schema['MaximumEntitySuggestions'] = 50;
schema['Width'] = '151px';
this.SPClientPeoplePicker_InitStandaloneControlWrapper(peoplePickerElementId, null, schema);}
and this is the code when page starts
initializePeoplePicker('peoplePickerDiv');
and that's what I want. I want to write code instead of the question marks to send the user to the SharePoint list and att the person to person field
listItem.set_item("lfua", ????????????);