I am not able to successfully pass a JSON object as a parameter, i get an uncaught referenceError..any ideas?
$.getJSON('./getMe.php', function(data){
$.each(data, function(key, pack){
var id = key.toLowerCase().replace(" ", "_");
$('#breadcrumbs').append(" <span id='" + id + " 'onclick='DoSomething(id, pack);'>" + key + "</span> ");
});
$('#breadcrumbs').append('</br></br>'); })
.success(function(){
$('#loader').hide();
});
function DoSomething(id, pack){
$.each(pack, function(stage, items){
alert(stage);
});
$('#packages').html('→ ' + id);
}