I have a task list that has a field AssigneTo which takes a user via the people picker. I can get the list item I need but I have no idea how I would access the oject being returned for the AssignedTo field.
I have tried
var theUser = listItem.get_item('AssignedTo')
alert(theUser.get_loginName());
and just using
listItem.get_item('AssignedTo').toString()