how to get key:value pair data from Document Object (Database)
- 1
- Tools
- General
- Databases
- Apple
- Self Hosted
Hi, everyone.
I am pretty new here and I have a problem with gathering data from the Database.
So far I managed to sucessfully create a session with user authentication. and executing basic functions.
But now I am stuck when I want to extract data from the response I get when excecuting following function (Picture 1)
The output of this function is (Picture 2)
My Attributes look like that (Picture 3)
I want to extract the attributes and use it in further functions but I can´t wrap my head around how to extract this data.
Maybe someone can help me get on the right path to solve this issue.
Try to remove queries on your code ? It not exist on getDocument endpoint
From doc print(String(describing: document)
Hi, Thanks for the response. I did what you said but the print statement you are refering only gives me the type of the variable (AppwriteModels.Document<Swift.Dictionary<Swift.String, JSONCodable.AnyCodable>>) but how do I extract this ?
I not use Swift so can't help more sry. Need to wait some apple developpers answer
Hey @Steven thanks for the link I better understand now how to do it. based on this project I started to rework my code and I am now facing an issue with the "@Published var user: User?" from AuthVM.
is this an old implementation which is not working anymore with newer appwrite versions ?
I'm not sure exactly...the only thing I can think of is that you need to pass some type for the user preferences
Recommended threads
- Urgent Help
Hello Appwrite team, I urgently need your help. I am the founder of OnBuch, an EdTech application used by around 10,000 users in Cameroon. In the last two day...
- How to use dart workspaces to deploy a f...
Hello, I'm developing a Flutter application and I would like to leverage dart pub workspaces to deploy a function with a dart runtime as advertised here : http...
- Migration from Cloud to Self-Hosted not ...
Hello Appwrite Community, I've got the problem, that when I try to migrate my Appwrite Project from the cloud to my self-hosted Appwrite, that an API Key is mi...