all_users.forEach(user => { let cid = ( ims_clean.filter(channel => { return channel.userid === user.userid; })[0] || {} ).channelid; user.channelid = cid; });