I found this answer https://stackoverflow.com/a/12636038/11792 to be very helpful to me how to query nested arrays. What I want now is to be able to update (push or replace) a value in the nested array. For example I want to replace all the "apple" values with "peach".
db.multiArr.insert({"ID" : "fruit1","Keys" : [["apple", "carrot", "banana"]]})
db.multiArr.insert({"ID" : "fruit2","Keys" : [["apple", "orange", "banana"]]})
I found 3 more questions about updating nested arrays but their answers do not seem to be helpful in this case. So how do we modify the values in the inner array?