Java Implementation of if else condition for $addFields and $project mongoDB operator Command failed with error 16412 : 'Invalid $addFields
I cannot figure to multiple fields by using $addFields for if else condition in MongoDB with Java operator. My requirement is to add Mutiple fields based of if else condition. I know how to add multiple fields bu using $addFields…