Mongo like aggregations on arrays
yarn add aggregatets
or using npm
npm i aggregatets
import aggregate from 'aggregatets'
const list = [{ name: 'test', value: 10 }, { name: 'jhon', value: 32 }, { name: 'Ester', value: 150 }]
const result = aggregate(list, [
{
$project: {
name: 1
}
}
])
console.log(result)
// [ {name: 'test', }, { name: 'jhon' }, { name: 'Ester' }]
to update or improve this project
yarn install
make
make test
- $match
- $match with regex
- $project
- $group
- $lookup
- $sort
👤 ** edgardleal **
- Website: https://github.com/edgardleal
- Github: @edgardleal
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator