Javascript – MongoDB update a document's array element at specific index and insert a new document when there's no match
UPDATE: the real purpose of this question is to find a FAST solution, I'm new to MongoDB so I thought it's fast if use a single query, however, any fast solution is okay. Basically I'm looking for a solution to…