const doc = await databases.createDocument(
DATABASE_ID,
USERS_COLLECTIONS_ID,
ID.unique(),
{ user_id: user.user.$id },
);
// how to get attribute data/values of doc????
Like this for example, how would I obtain the DATA like user_id (and other default values) from the document I just created.....
What did you see when you logged doc?
Oh I see the values, the Appwrite Documentation never said that there could be more properties in the object
I thought there were other functions to obtain the value.
I'm a newbie with databases and all of this
Yes, your document is returned along with all of its data.
It's sort of mentioned here too https://appwrite.io/docs/products/databases/quick-start#create-documents
Recommended threads
- I'm getting an error on the console "j?....
On my self hosted instance version 1.8.1 the console is giving me this error when trying to view the rows for a table I recently created. My application is read...
- Websites hosted on my appwrite sites hav...
Hello, all my websites hosted on appwrite sites are not running I am getting this message "This site can’t be reached drivehub.appwrite.network took too long t...
- Database Write Limits hit
Hello Appwrite Admins, I'm a GitHub Education user, and about a week ago, my database was really badly optimized, resulting in about 600k writes in a single day...