mongosha icon indicating copy to clipboard operation
mongosha copied to clipboard

Let's get the paths specified in the collections

Open aloshai opened this issue 3 years ago • 0 comments

const result = collection.get("user"); // => [{ "id": 1, "balance": 3 }, { "id": 2, "balance": 300 }, { "id": 13 "balance": 400 }]

const result = collection.get("user.balance"); // => [3, 300, 400];

const result = collection.get("user.balance", "user.id"); // => [{ "id": 1, "balance": 3 }, { "id": 2, "balance": 300 }, { "id": 13 "balance": 400 }]

aloshai avatar Apr 22 '21 23:04 aloshai