Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-161

Improper JSON Formatting for Nested Expressions: Aggregation Framework

    XMLWordPrintableJSON

Details

    Description

      To function properly, the nested expressions need to formatted in correct JSON, enclosed in their own objects.

      The documentation shows the following short example:

      $add:[5, $divide:[12, 2], 7]

      To render correctly, the $divide command must be an object:

      $add:[5, { $divide:[12, 2] }, 7]

      Example: https://gist.github.com/2024712

      Current location of documentation piece: http://www.mongodb.org/display/DOCS/Aggregation+Framework+-+Expression+Reference#AggregationFramework-ExpressionReference-Composition

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            bpartridge Brian Partridge
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11 years, 49 weeks, 2 days ago