Home / CSE MCQs / MongoDB MCQs :: Discussion

Discussion :: MongoDB MCQs

  1. Which of the following method is called while accessing documents using the array index notation ?
  2. A.
    cur.toArray()
    B.
    cursor.toArray()
    C.
    doc.toArray()
    D.
    All of the mentioned

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    The toArray() method returns an array that contains all the documents from a cursor.


Be The First To Comment