1.

Comparison expressions return a boolean except for ________ which returns a number.(a) $copy(b) $cmp(c) $num(d) None of the mentionedI had been asked this question in an internship interview.Question is from Pipeline Limits in portion Aggregation Concepts and Aggregation Mechanics of MongoDB

Answer»

Right choice is (b) $cmp

The BEST I can EXPLAIN: The $cmp compares both VALUE and TYPE, using the SPECIFIED BSON comparison order for values of different types.



Discussion

No Comment Found

Related InterviewSolutions