2

I have a document with 2 arrays.

I want to pull something from the first array and add it to the other. Only way I know is completely FindOneAndUpdateAsync, get the instance and add it to set.

problem is, this is not atomic. I would love to get a direction.

UNFORTUNATLY I just have no proper code to share with you to show you that I tried because its a stupid one.

Group A = {0,1,2,3,4}

Group B = {5,6,7,8}

I want, for example, take 4 from froup A and move it to B, atomically. Both Group A and Group B are under the same document.

TIA.

Ori Refael
  • 2,888
  • 3
  • 37
  • 68

0 Answers0