CosmosDB Graph: How to update a value of property of vertex having multiple values using gremlin?

Viewed 808

Suppose my query is :

g.addV('employee').property('id', 'john').property('country', 'USA').property('country', 'India')

which adds property country with two values i.e USA and India.

[
 {
  "id":"john",
  "label":"employee",
  "type":"vertex",
  "properties":{
                "country":[
                          {
                           "id":"5dc2aaf6-cb11-4d4a-a2ce-e5fe79d28c80",
                           "value":"USA"
                          },
                          {
                           "id":"fcf4baf6-b4d5-45a3-a4ba-83a859806aef",
                           "value":"India"
                          }
                          ]
                }
 }
]

Now I want to change one of the existing values. For example 'India' to 'China'.

What will be query for that?

3 Answers
Related