Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-3980

$round not working in aggregation

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 1.19.12
    • None
    • Ubuntu 18.04

    Description

      I tried using MongoDB Aggregation Pipelines but $round is not working properly. I tried to replicate your example in the documentation but got an warning instead:

      Expected "[" or AggregationStage but "{" found.

      { roundedValue: { $round: [ "$value", 1 ] } }

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            jerome.deleon107@gmail.com Jerome de Leon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: