These are chat archives for Automattic/mongoose

Feb 2019
Feb 14 01:01
I guess it's worth pointing out that the above delete call returns 'true' as one would expect, but when evaluated, the array has not been updated
after the .foreach has completed. It just occurred to me that we're dealing with callbacks here, so is it possible that I need t promise or simply .then() to assure the foreach has completed all loops
Feb 14 01:12
No, apparently array.forEach() is in fact synchronous, unless that doesn't apply to the version of foreach related to arrays in Mongoose documents... Any guidance?
Feb 14 01:42
If this item from 7 years back is still valid it might be the answer to my above inquiry... testing now...
Austyn Studdard
Feb 14 23:36
using document.set() can I add to / modify existing objects in an array