I am trying to populate $('div').data() through JSON. It works fine with JQuery.parseJSON but not with $.getJSON.
// works as expected
$('div').data('dat', { xmin: '-10', xmax: 40 });
$('div').data('dat', jQuery.parseJSON('{"bbx" : {"xmin" : "-10", "xmax" : "40"}}'));
// doesnt work
$('div').data('dat', $.getJSON("init.php", function(json) {return(json);}));
 
     
     
     
     
    