Last active
May 9, 2018 10:25
-
-
Save d3ep4k/d8952232b4b390b18f3f1d72a3abb77c to your computer and use it in GitHub Desktop.
Populate datatable with metamug json-dataset datatype
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.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