I have this jquery code to output the entries in a JSON file on page load...
$.getJSON(\'b.json\', function(data) { $(\'#dictionary\').empty().hide();
Looks like you want a random entry from an array.
try:
var random_entry = entry[Math.floor(Math.random() * entry.length)]
$.getJSON('b.json', function(data) { var entry = data[Math.floor(Math.random()*data.length)]; //do the same exact thing with entry }