Если вы используете jQuery, вы можете сделать:
$.getJSON('users/new.json', function(data) {
console.log(data); //you'll find your json here
});
Вы делаете:
$(document).ready(function() {
$(function(){
$.getJSON('releases/new.json', function(data1) {
alert("inside getJson"); alert(data1); console.log(data1);
});
});
Но вы должны сделать:
$(document).ready(function() {
$.getJSON('releases/new.json', function(data1) {
alert("inside getJson"); alert(data1); console.log(data1);
});
});
Или:
$(document).ready(function() {
$(function(){
$.getJSON('releases/new.json', function(data1) {
alert("inside getJson"); alert(data1); console.log(data1);
});
})();
});