Could someone help me with this:
I am getting an unexpected token error, I have validated my json file and the JS. But I still get an error.
HTML
<div class="load"></div>
Here is the JS
/* Table load */
var uri = 'http://*****.com/TestFiles/';
$.ajax({
url: uri + 'json/banks.json',
dataType: 'jsonp',
success: function(data){
var account = data;
console.log(data);
$.each(account, function(Key, Val) {
var row=$('<div class="row"></div>');
console.log(account);
$.each(Val, function(k, v){
console.log(account);
$('<div class="cell"><p>' + v + '</p></div>').appendTo(row);
});
row.appendTo('.load');
});
}
});
This is the json file
{
"count": 5,
"records": [
{
"name": "Big Guy",
"apy": "0.75",
"earnings": "376.41"
},
{
"name": "URGrant",
"apy": "0.87",
"earnings": "436.89"
},
{
"name": "CheatandGrace",
"apy": "0.01",
"earnings": "5.00"
},
{
"name": "The Onion",
"apy": "0.01",
"earnings": "5.00"
},
{
"name": "Pellet Grant",
"apy": "0.01",
"earnings": "5.00"
}
]
}
Any help could be great.