I am struggling to find a way to create a query that will allow me to match one of three fields (field_A, field_B, field_C) and then alter the field that was matched on, using $addFields.
Example Document:
{
field_A: 5,
field_B: 10,
field_C: 15
}
If I check for a document that has a value of 10 in one of those three fields, I’d like it to match the document above and then allow me to alter the proper field that was matched on with $addFields, in this case it would be field_B. Is this possible?