How can I get the results using $each outside of the scope:
$('body').on('click', 'a.action', function() {
var dataresult = $(this).data("set");
$.each(dataresult.page[0], function(key, value) {
//do something here
});
//Result needs to go here in this format
"key": value,
"key1": value1,
"key2": value2,
});
Does jQuery have something like implode?