In nedb, I have an array field in a document. How will I update an array element at any index?
For example,
{
fruits:['mango','apple','banana']
}
I would like to modify the 2nd element and make the array as ['mango','pear','banana']
.
How to do it using db.update
?