|
|
@ -663,9 +663,17 @@ DataSet.prototype._filterFields = function (item, fields) { |
|
|
|
|
|
|
|
var filteredItem = {}; |
|
|
|
|
|
|
|
for (var field in item) { |
|
|
|
if (item.hasOwnProperty(field) && (fields.indexOf(field) != -1)) { |
|
|
|
filteredItem[field] = item[field]; |
|
|
|
if(Array.isArray(fields)){ |
|
|
|
for (var field in item) { |
|
|
|
if (item.hasOwnProperty(field) && (fields.indexOf(field) != -1)) { |
|
|
|
filteredItem[field] = item[field]; |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
for (var field in item) { |
|
|
|
if (item.hasOwnProperty(field) && fields.hasOwnProperty(field)) { |
|
|
|
filteredItem[fields[field]] = item[field]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|