The $replaceOne
aggregation pipeline operator was introduced in MongoDB 4.4.
This operator replaces the first instance of a search string in an input string with a replacement string and returns the result.
If the search string isn’t found, then $replaceOne
returns the input string.