Hi, I need to insert a key-value pair on a doc on which the key string contains dots, the problem is that the insert method of the mutateIn builder interprets the key as the path and therefore, instead of creating a single key-value pair, it creates a tree.
Example, this code:
const key = 'perfmon.phy_disk.pct_disk_read_time';
const value = 123;
bucket.mutateIn(docKey)
.insert(key, value)
.execute(err => {
...
});
Creates this doc:
{
perfmon: {
phy_disk: {
pct_disk_read_time: 123
}
}
}
What I want to obtain is instead:
{
perfmon.phy_disk.pct_disk_read_time: 123
}
Is there a way to escape the dot char for the insert operation?
Thanks in advance,
Juan