
TypeScript
import sdk, { ID, Permission, Role, Databases, Query } from "node-appwrite";
import {PUBLIC_API_ENDPOINT, PUBLIC_PROJECT_ID, PUBLIC_API_KEY, } from '$env/static/public'
// Init SDK
const client = new sdk.Client();
const databases = new sdk.Databases(client);
const collectionId = databases.listDocuments(
'64502243369b884d71f8',
'647295a5228d3bd685da',
[
Query.select("accountId", accountId)
]
);```
`attributes.map is not a function error`
I got this error when I changed `Query.search("accountId", accountId)` to `Query.select("accountId", accountId)`
TL;DR
The user encountered an error with the message "attributes.map is not a function". They were using the Appwrite SDK and had made a change in their code from `Query.search("accountId", accountId)` to `Query.select("accountId", accountId)`. The user later resolved the issue.
NVM I Got it

[SOLVED] attributes.map is not a function error
Recommended threads
- Queries Length Error.
Hi All, I am having a issues across my app with how i am getting data, and just wanted to check if this was an issues with the new changes on appwrite over the...
- Explore uploaded images directly from lo...
Is there any option to explore/dwonload uploaded files to from local machine? I connected through WinScp to my vps and to files from docker volume 'appwrite_app...
- The current user is not authorized to pe...
I'm just getting this error while it was working couple minutes ago, my users have permissions to access and create tables data but on some databases I'm just g...
