When using mongoshell sometimes the commans use square brackets… is there any tip to know when you have to use them … or it is something that one have to learn and know it by heart???
Square brackets are for arrays.
Parenthesis delimits the parameters of a function.
Curly braces are object delimiters. They also define code scope.
Please refer our documentation on documents in MongoDB and then you should have a clear understanding of the structure and different components of documents in MongoDB.
If you still have any other query please feel free to get back to us.
Curriculum Support Engineer