I am trying to itterate trough a jquery array, and I am having an error The script causing the error is:
$.each(amount, function (key, value) {
console.info('>>> Selected line: '+value.value + " " + value.currency);
if ((value.currency == currency) && (value.value == val)) {
amount.splice(key,1);
console.info('Deleted: [' + value.value + " " + value.currency+ "] from line "+ key);
}
});
The error firebug throws is:
TypeError: value is undefined
Could someone point me where the error is or how to fix the error?