|
@ -651,12 +651,16 @@ DataSet.prototype.map = function (callback, options) { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Filter the fields of an item |
|
|
* Filter the fields of an item |
|
|
* @param {Object} item |
|
|
|
|
|
|
|
|
* @param {Object | null} item |
|
|
* @param {String[]} fields Field names |
|
|
* @param {String[]} fields Field names |
|
|
* @return {Object} filteredItem |
|
|
|
|
|
|
|
|
* @return {Object | null} filteredItem or null if no item is provided |
|
|
* @private |
|
|
* @private |
|
|
*/ |
|
|
*/ |
|
|
DataSet.prototype._filterFields = function (item, fields) { |
|
|
DataSet.prototype._filterFields = function (item, fields) { |
|
|
|
|
|
if (!item) { // item is null
|
|
|
|
|
|
return item; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var filteredItem = {}; |
|
|
var filteredItem = {}; |
|
|
|
|
|
|
|
|
for (var field in item) { |
|
|
for (var field in item) { |
|
|