$round not working in aggregation

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.19.12
    • None
    • Environment:
      Ubuntu 18.04
    • None
    • None

      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 ] } }

       

            Assignee:
            Unassigned
            Reporter:
            Jerome de Leon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: