mayki2000 / jquery-csv

Automatically exported from code.google.com/p/jquery-csv
MIT License
0 stars 0 forks source link

배열의 기본 속성값(remove)이 포함 됩니다. #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
해당 구문 이구요.

###############################################################
      // convert data to objects
      for(var i=0, len=lines.length; i<len; i++) {
        var entry = $.csv.toArray(lines[i], options);
        var object = {};
        for(var j in headers) {
          object[headers[j]] = entry[j];
        }
        data.push(object);

        // update row state
        options.state.rowNum++;
      }
################################################################
대략 다음과 같이 수정이 필요한것 같네요.
      // convert data to objects
      var headerCount = headers.length;
      for(var i=0, len=lines.length; i<len; i++) {
        var entry = $.csv.toArray(lines[i], options);
        var object = {};
        var j = 0;
        for(;j < headerCount ; j++) {
          object[headers[j]] = entry[j];
        }
        data.push(object);

        // update row state
        options.state.rowNum++;
      }
##############################################################

수고하세요

Original issue reported on code.google.com by kjh1...@gmail.com on 26 Nov 2013 at 12:47

GoogleCodeExporter commented 9 years ago

Original comment by evanpla...@gmail.com on 9 Dec 2013 at 11:15