In JavaScript, how can I push an object to an array, along with some other new property. For example, I want to do something like this:
for(var i=0; i<T_ARRAY.length; i++)
{
if(!T_ARRAY[i].isCorrect)
{
NEW_ARRAY.push({T_ARRAY[i], 'idxPerg' : i+1});
}
}