The lodash _.pull method cannot be saved to the database after modifying the array.

  node.js, question

var shareIdArray = tag._share;
_.pull(shareIdArray, shareId);
var updateTag = _.assign(tag, {_share: shareIdArray}); () {…})

I got shareIdArray from the database inside, and deleted an element with _.pull method in lodash.
Console.log(updateTag) can see that it was deleted, but it was not found in the database inside. If I use mongoose’s pull method, I can see that the database inside has also been deleted. Why

_.pull only modifies shareIdArray in memory inside, not the database.