I have data like this in my Couchbase:
{
“mappings”: {
“/”: “Ana sayfa”
},
“platform”: “WEB”
}
I want to convert all data like this:
{
“/”: {“viewLabel”:“Ana Sayfa”}
“platform”: “WEB”
}
So I want to share old version:
{
“_class”: “com.commencis.appconnect.adminpanel.data.entity.ScreenNamesMappingEntity”,
“id”: “whitelabel::WEB::screenNamesMapping”,
“mappings”: {
“/”: “Ana sayfa”,
}
}
I want to create new document with above id:
( “id”: “whitelabel::WEB::screenNamesMapping”)
and delete the old one.
I want to create and convert like this:
{
“_class”: “com.commencis.appconnect.adminpanel.data.entity.ScreenNamesMappingEntity”,
“id”: “whitelabel::WEB::screenNamesMapping”,
“mappings”: {
“/”: { “viewLabel”: “Ana sayfa” } ,
}
I need to write script. I want to create new document with related id, then delete the old one, it could be multipe N1QL
I should not update the old data, new data should have new key, and I should edit the new key with the old one and delete the old one. I need to do with that way.