set.take()
Examples
Get the first two documents in the Set of Product
documents:
Product.all().take(2)
{
data: [
{
id: "111",
coll: Product,
ts: Time("2099-10-22T21:56:31.260Z"),
name: "cups",
description: "Translucent 9 Oz, 100 ct",
price: 698,
stock: 100,
category: Category("123")
},
{
id: "222",
coll: Product,
ts: Time("2099-10-22T21:56:31.260Z"),
name: "donkey pinata",
description: "Original Classic Donkey Pinata",
price: 2499,
stock: 50,
category: Category("123")
}
]
}
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!