SharePoint Person/Group Column with REST API

With SharePoint REST API you can iterate through all columns. But what happens when you want to display a Person/Group column like the Author? You will get a User ID as a result.

To display the “Authors Full Name” instead of the ID just use the parameter $expand.

var listname = "My List";
var url =  _spPageContextInfo.webAbsoluteUrl + 
  "$orderby=Created desc&amp"+;
 url: url ,
 method: "GET",
 headers: {"Accept": "application/json; odata=verbose" },
 success: function (data) {
   if(data.d.results.length >0){
    for (var i = 0; i < data.d.results.length; i++){

And if you need to use the filter based on the Person/Group column here is how to declare it:

var urlPI = _spPageContextInfo.webAbsoluteUrl +
       "$orderby=Created desc"+
       "$filter=Author eq '"+_spPageContextInfo.userId+"'";