I need to create a multidimensional array in JavaScript
My code as follows but get console error "Uncaught TypeError: Cannot set property 'time' of undefined"
var timeLogDetails = {};
$('.time_input').each(function(i, obj) {
timeLogDetails[i]['time'] = $( this ).val();
timeLogDetails[i]['timeLog'] = $( this ).attr('timelog');
});