SoftInstigate / restheart

Rapid API Development with MongoDB
https://restheart.org
GNU Affero General Public License v3.0
805 stars 171 forks source link

Convert the mongodb Aggregation for restheart #197

Closed genxlogics closed 7 years ago

genxlogics commented 7 years ago

Hi All, i am trying below mongodb db aggregation to be used through restheart. the value for "vehicleType" woulld be my variable to pass for the aggregation query. could somebody please help me to understand how must i set the aggrs properties??

Mongodb Aggregation

db.tempTest.aggregate([ { $match: {"vehicleType": "OR"}}, { $project: { vehicles: {$filter: { input: '$vehicles', as: 'item', cond: {$eq: ['$$item.languageIndicator', "EN"]} }} }},

])

genxlogics commented 7 years ago

okay, i go that working nicely...thanks Restheart team !!