In Aerospike, how can I add a new key/value pair in nested object stored in bins of type map?
For ex, I have a bins of type map against which I need to store below key/value pairs.
{
"a" : "apple",
"b" : "ball",
"c" : { "d" : "dog", "e" : "elephant" },
"f" : { "g" : { "h" : "horse" } },
"i" : { "j" : "jackal", "k" : { "l" : "lion", "m" : "monkey" } }
}
Now, I want to update an existing nested object against key "k" to add one more key value pair like below.
"k" : { "l" : "lion", "m" : "monkey", "n" : "nest" }
Final result should be like below.
{
"a" : "apple",
"b" : "ball",
"c" : { "d" : "dog", "e" : "elephant" },
"f" : { "g" : { "h" : "horse" } },
"i" : { "j" : "jackal", "k" : { "l" : "lion", "m" : "monkey", "n" : "nest" } }
}
Any suggestions on how to achieve this? It's a NodeJS (10.6.0) application & I'm using NodeJS aerospike client (3.6.1) to interact with Aerospike (4.3.0.7).