var movies = [
{}, {}, {} ....
]
$(function(){
$.getJSON('https://rawgit.com/jiren/JsonQuery/master/examples/data/movies.js', function(data) {
for(var i=0;i<data.movies.length;i++){
$('#demo').append('data.movies[i].name');
}
});
});
Request Failed: parsererror, SyntaxError: Unexpected token v in JSON at position 0
$.getScript('https://rawgit.com/jiren/JsonQuery/master/examples/data/movies.js',
function() {
movies.forEach(function(movie){
$('#demo').append('<h3>'+movie.name+'</h3>')
})
})
https://jsfiddle.net/f2y74ym6/