Skip to main content

Field selection

Using the fields parameter, you can specify exactly which fields you want to return from each record. This reduces the response payload and improves application performance.

Return specific fields​

TypeScript
// This example returns only the user's ID, first name, and last name.
const users = await manta.fetchAllRecords({
table: "users",
fields: ["user_id", "first_name", "last_name"],
page: 1,
list: 10,
});

Return all fields​

If you omit the fields parameter, the method will return all fields from each record by default.

TypeScript
const users = await manta.fetchAllRecords({
table: "users",
page: 1,
list: 10,
// No fields specified returns all fields
});