I\'ve been losing hours over something that might be trivial:
I\'ve got a list of comma-separated e-mail addresses that I want to convert to a specific JSON format,
Try changing the loop to this:
var JSON = []; $(pieces).each(function(index) { JSON.push({'email': pieces[index]}); });