How to know when data is loaded on People Picker field

Hi,

How can I known when data is loaded on People picker field.

I tried to use .ready function like follow sample code but I do not see any data on “people” variable

fd.field(‘Persons’).ready().then(function(field) {
var people = field.value;
});

Thanks

Dear @dat,
It should be available, make sure to wrap it inside of an event, and remember that you can only use people variable inside - this script is async, so it will only run once the field is ready (other scripts will run before):

fd.spRendered(function() {
    var people = [];
	fd.field('Persons').ready().then(function(field) {
	    people = field.value;
        //real value is available here, you'll see it in alert:
	    alert("Inside: " + JSON.stringify(people));
	});
    //this alert will appear first with message: "Outside: []"
	alert("Outside: " + JSON.stringify(people));
});