chapter4:Expressive Query Operator

I feel there is an error in the video, in the video, it says for aggregation syntax it is
{ operator: {field, value}}
but in code it is given as
{ $gt:["$start station name", “$end station name”]}
so here they are using array(operator: array) in code, but in video it says object (operator: object)

so can u plz clarify this doubt, and tell me what is the correct aggregation syntax

Hi @Adithya_Shetty, this seems like a typo in the slide. I will forward this to the appropriate team, and please be rest assured that the team will be fixing this as soon as possible.
For the time being, I would recommend you to go through the $expr documentation.
And yes, the following is the correct syntax, and it should be an array always:

{ $gt:["$start station name", “$end station name”]}

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer

1 Like

Okay, thanks a lot :slight_smile:

1 Like