Skip to content

New Feature: Conditional update query #796

@akoserwal

Description

@akoserwal

Problem Statement:

  "query": {
    "array": "AddressEntity",
    "elemMatch": {
      "$and" :[
                      { 
                         "field": "countryCode",
        	          "op": "=",
        	          "rvalue": "CA"
         	
                        },
                      {
        	         "field": "stateName",
        	         "op": "$in",
    		         "values":[ "Alberta", "British Columbia", "Manitoba"]
                     }
                  ]
                }
            }

Resultant projection of this type of query will be like:

{...
state: "Manitoba"
},
{....
state:"Alberta"
}

Requirement: To replace state name like "Manitoba" with "MB" & "Alberta" with "AB "will require conditional update statement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions