I have a set of documents of the type:
contactId: V123132,
{
"accessMap": {
"136400": [
"STANDARD"
],
"136401": [
"STANDARD"
],
"136535": [
"STANDARD"
],
"136672": [
"RG0763",
"ADMIN",
"STANDARD"
],
"136676": [
"RG0763",
"ADMIN",
"STANDARD"
]
}
},
"documentType": "ACS_MAP"
I want to update the keys of the accessMap and append a ":2" at the end of each key in the accessMap,I'm trying to figure out how to write query for that.
What I've done so far is to select the keys of the accessMap I did a:
SELECT OBJECT_NAMES(contact-services.accessMap) from contact-services where documentType = "ACS_MAP"
which gives me:
{
"$1": [
"136400",
"136401",
"136535",
"136672",
"136676"
]
}
I'm not sure if this is the right approach for it..?