I'd like to create that function :
generateJson = function()
{
var controls = {
"invoicedate" : "invoicedate",
"duedate" : "duedate"
};
var jsonLog = {};
$.each(controls, function(index, value, jsonLog) {
jsonLog[value] = "t";
});
$('#jsoncode').val(JSON.stringify(jsonLog));
}
I have an error : Uncaught TypeError: Cannot set property 'invoicedate' of undefined
How can I make the jsonLog var available in my inline function ?
Regards