mongodb/docs — pull request #1073 by dmorehouse (2013-06-26 21:10:02+00:00)
Title: Added an example of how to use cond

Feel free to reformat this but please accept this example of how to use cond. The current docs are 100% accurate however, after reading them, it still wasn't obvious how to use the cond statement in the aggregation framework. Googling only returned a single page that actually had an example on it. An example like this would have been VERY helpful to me and hopefully others find this helpful as well.