Skip to content

Instantly share code, notes, and snippets.

@d3ep4k
Last active May 9, 2018 10:25
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 d3ep4k/d8952232b4b390b18f3f1d72a3abb77c to your computer and use it in GitHub Desktop.
Save d3ep4k/d8952232b4b390b18f3f1d72a3abb77c to your computer and use it in GitHub Desktop.
Populate datatable with metamug json-dataset datatype
$.ajax({
"url": "https://wondrx.metamug.net/movies/v1.0/movies",
beforeSend: function(xhr){
xhr.setRequestHeader('Accept', 'application/json+dataset');
},
"success": function (json) {
$("#movieList").dataTable( {
"aaData": json.dataset
});
},
"dataType": "json"
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment