Simple problem in Jquery - however the solution is not clear to me
$( document ).ready(function() {
handleJson();
});
function handleJson(){
$.getJSON("fileList.json", function(json) {
$.each(json, function(idx, obj) {
console.log(json.fileurls[idx]);
});
});
}
And this is my json
{
"fileurls":[
"file y 2014-09-17 10_43_40",
"file x 2014-09-15 10_15_32"
]
}
The printed result in console is undefined
console.log(json);output?