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
- Our Appwrite organization is suspended
Please give support regarding this , no app is working now , please solve my issue and give support , no one is replying in message section or email.
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...