Working with People/Group column and Lookup column is always a small hurdle in development.
$expand

This is very useful when dealing with a person or lookup field where only the Id is returned. Using this, we can get corresponding values based on Id.
See the below example:
Lookup Field: Say, there is City column in Country list which is a lookup to Title column in Info List.
  1. /_api/web/lists/getbytitle('infolist')/items?$select=ID,Title,Employee,company,city/Id&$expand= city/Id
People Field: Let’s say list has a custom field: Author, it will return ‘AuthorId’ in response.
What is the proper way to deal with people field? You need to use ‘$expand’ parameter to expand the field.
Following REST URL gives your idea how to use $expand.
  1. /_api/web/lists/getbytitle('infolist')/items?$select=Author/Title&$expand=Author/Id
Rest URL to be use SP 2013
  1. var ListName = 'test';
  2. var url = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle(" + ListName + ")/items?$Select=Title,Author/ID,Author/FirstName,Author/LastName,Author/Title,Author/Department,Author/SipAddress&$expand=Author/ID ";
  3. function GetData() {
  4. var ListName = 'Test';
  5. var url = "https://XXXXX.sharepoint.com/sites/testsite" + "/_api/web/lists/getbytitle('Test')/items?$Select=Title,Author/ID,Author/FirstName,Author/LastName,Author/Title,Author/Department,Author/SipAddress&$expand=Author/ID ";
  6. $.ajax({
  7. url: url,
  8. headers: {
  9. Accept: "application/json;odata=verbose"
  10. },
  11. async: false,
  12. success: function(data) {
  13. var items = data.d.results; // Data will have Author object
  14. },
  15. eror: function(data) {
  16. alert("An error occurred. Please try again.");
  17. }
  18. });
  19. }
Author object will be appended in the result,