I have created an object that contains properties with empty values. I would like to access these properties by index and override their values. How can I do this ?
GetAllData: function(){
    var jobPayments = $("#table1 tbody tr");
    var jobPaymentsModels = [];
    jobPayments.each(function (idx, vl) {
        var jobPayment = {date:"",amount:0.0,method:"", reference:""};
        $(this).find("td input,select").each(function (idx, vl) {
            jobPayment[idx] = vl.value;
        });
        jobPaymentsModels.push(jobPayment);
    });
    return jobPaymentsModels;
}
 
    