Retrieve Data from SharePoint List using REST api jQuery <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.4.min.js"></script> <script type="text/javascript"> var listName = "ListB"; // This code runs when the DOM is ready and creates a context object which is needed to use the SharePoint object model $(document).ready(function () { GetEmployeeDetails(); }); function GetEmployeeDetails() { $.ajax({ url: _spPageContextInfo.siteAbsoluteUrl + "/_api/web/lists/GetByTitle('" + listName + "')/items?$Select=Title,EmployeeName,Salary,Dept/Title,Dept/Code,Dept/pqol&$expand=Dept", type: "GET", headers: { "Accept": "application/json;odata=verbose" }, // return data format success: function (data) { //console.log(data.d.results);