Hi Team,
I need to pass variable value into REST API query in JSOM sharepoint online. I need to pass _ID like a filter in the REST query in " url: " to retrieve records based on the ID value. Can someone suggest this?
Below is the logic I am using:
$(document).ready(function () {var _ID = GetUrlKeyValue('ID');
loadData();
}); function loadData() {
try {
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('Logs')/items?$select=ID,SiteId,SiteTitle,ErrorDetails&$expand=SiteId",
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
Ganesh