j.j
09/10/2019, 3:02 AMbattk
09/10/2019, 3:08 AMj.j
09/10/2019, 3:11 AMdbaghdanov
09/10/2019, 6:55 PM_.map(array, function(element){
_.find(otherArray, function(otherArrayElem){
return it if found
}
_.assign(sourceArray, value);
}
battk
09/10/2019, 8:02 PMj.j
09/11/2019, 3:10 AMdbaghdanov
09/11/2019, 4:01 AMvar resultSet1 = [];
search.run().each(function(result){ resultSet1 .push(result.ToJSON()); return true; });
var resultSet2 = [];
otherSearch.run().each(function(result){ resultSet2.push(result.ToJSON()); return true; } );
and then you can apply that:
_.map(resultSet1, function(r1elem){
_.assign(resultSet1, _.find(resultSet2, function(r2elem){ return r1.elem.values.customfield == r2elem.values.othercustomfield;