code: function itemsToRows(itemsObject){
      var rows = [];
      var schemas = {};
      itemsObject.forEach(function(item){ 
          var schema;
          if (item.hasOwnProperty('schema') && item.schema && item.schema.rid != undefined && item.schema.properties) {
              schema = item.schema.properties;
              schemas[item.schema.rid] = schema;
          } else 
              schema = schemas[item.schemaRid];
  
          if (schema != undefined) {
              var row = item.values.reduce(function(itemObject, val, i){
                  var propName = schema[i].name;
                  itemObject[propName] = val;
                  return itemObject;
              }, {});
              rows.push(row);
          }
      });
      return rows;
  }
docs: ***** MAP   end