title: Mongodb: MongoError: The dollar ($) prefixed field '$addFields' in '0.$addFields' is not valid for storage
body: <p>Trying to merge two array of objects conditionally:</p>
  <pre><code>await Product.findByIdAndUpdate(req.params.id, [
            {
              $addFields: {
                tags: {
                  $reduce: {
                    input: incomingTags,
                    initialValue: '$tags',
                    in: {
                      $cond: [
                        { $in: ['$$this.name', '$tags.name'] },
                        '$$value',
                        { $concatArrays: [['$$this'], '$$value'] },
                      ],
                    },
                  },
                },
              },
            },
          ]);
  
  </code></pre>