var res = []; var res = $("#file").val(); $.each(res, function (index, value){ console.log('index: ' + index, 'value: ' + value ); });