I have two arrays like
var members = [{docId: \"1234\", userId: 222}, {docId: \"1235\", userId: 333}]; var memberInfo = [{id: 222, name: \"test1\"}, {id: 333
Do a nested map and update the top level element with the additional field date where fields in the arrays match.
date
member.map(mem => { return memberInfo.map(info => { if (info.id === mem.userId) { mem.date = info.date; return mem; } } }