Get query string parameter using JavaScript

Following code will help in fetching the value of a query string parameter.


If URL is http://server/page.html?id=1

Then usage would be GetQueryStringParameters(“id”) which would return 1

Remove duplicate list items from SharePoint REST call result using JavaScript

The following code snippet show how to remove duplicate list items in the JSON result of a SharePoint REST call using JavaScript.

Function Definition:

Function Usage:
In the below code, assumption is that, the REST call returns data.d.results and the column for which duplicate items need to be removed is Title


Pass multiple parameters in SetTimeout JavaScript Function

Following is a code snippet which show how to pass multiple parameters in JavaScript’s SetTimeout() function.

Load scripts in SharePoint within custom Javascript or Workflow

Following is the code which can be used to load JavaScript in sequence.

This code for example loads the reputation.js from SharePoint’s layouts folder & jQuery from site assets.