We do know that we can set the value for this attribute can be an array. In instance, we have List of String with the name of followers, and then currently in this specific document it have this value ['Mosh','Josh']. Now what if in client side I want to add another element we can call it 'Tosh' as a new followers. So what function or how can we do this to upload this new element? Hence, if we successuly update the document then the followers' attribute we will have ['Mosh','Josh','Tosh'].
for example in firebase
they have arrayUnion method does appwrite have something like this?
firebase.firestore() .collection('proprietary') .doc(docID) .set( { sharedWith: [{ who: "third@test.com", when: new Date() }] }, { merge: true } )
or something like merge
we don't have any array operations yet. You might want to ππΌ this issue: https://github.com/appwrite/appwrite/issues/2531
For now, you'll have to replace the attribute with the full updated value
[CLOSED] How to upload a new element for specific Attribute
Recommended threads
- TLS provisioning failure for custom doma...
Hi Appwrite team, weβre using Appwrite Sites and TLS provisioning for our custom domain fails. Domain: somnara.app Error: Failed to create TLS subscription β...
- Functions Problem
Whenever I run my AI Generate through Appwrite Functions, I am getting this Call Stack AIService.generateServer (src\services\ai\gemini.ts) next (<native>) ...
- Couldnt not do appwrite push tables
Not sure why i am not able to create my tables