Hi ,
I have document like below :
{
"contact_id": "10",
"email": "abc@xyz.com",
"subscription_id": "0",
"product_name": "RATE",
"product_id": "1",
"strategycalendar": [{
"bid" : 123 ,
"showSliderShading": "true",
"sliderLowerHandle": "-25",
"sliderUpperHandle": "30",
"rateChangeViewAs": "C",
"rateChangeComparedTo": "7"
}]
}
I want to perform insert into this subdocument as new dictionary with below elements so that final one will look like:
{
"contact_id": "10",
"email": "abc@xyz.com",
"subscription_id": "0",
"product_name": "RATE",
"product_id": "1",
"strategycalendar": [{
"bid" : 123 ,
"showSliderShading": "true",
"sliderLowerHandle": "-25",
"sliderUpperHandle": "30",
"rateChangeViewAs": "C",
"rateChangeComparedTo": "7"
},
{
"bid" : 567,
"showSliderShading": "true",
"sliderLowerHandle": "-25",
"sliderUpperHandle": "30",
"rateChangeViewAs": "C",
"rateChangeComparedTo": "7"
}
]
}
Can we achieve this new dictionary elements insert using N1QL ?
Also if I want to update one entire sub-document can this be done via N1QL .
We have tried couple of API methods for Python 3.0 and fails on Subdocument Mutate so not sure if API or N1QL is right and FAST method to do this kind of operation . Please help
thanks