Skip to content

Instantly share code, notes, and snippets.

@sadhu89
Last active January 25, 2016 04:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sadhu89/c2eb40240c14b6573ee4 to your computer and use it in GitHub Desktop.
Save sadhu89/c2eb40240c14b6573ee4 to your computer and use it in GitHub Desktop.
ajax.js
var root = 'http://jsonplaceholder.typicode.com';
var options;
$.ajax({
url: root + '/users',
method: 'GET',
async:false
}).then(function(data) {
options=data.map( u => u.username );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment