Back

Clarification on how appwrite handles array data.

  • 0
  • Databases
  • Cloud
𝕯𝖆𝖓
14 Mar, 2025, 11:08

Hello, I am trying to update an array in an existing document with new data and I am a bit confused on how appwrite handles arrays. Lets say I want to create an array of objects. Using the update document method, how should I pass the data?

A) "[{Object1 :value 1} , {Object2 :value 2}]" as an array B) "{Object1 :value 1}" , "{Object2 :value 2}" multiple strings C) "{Object1 :value 1} , {Object2 :value 2}" single string

Is there any documentation on how appwrite parses data for the array attribute?

TL;DR
To update an array in an existing document using Appwrite, developers should pass the data as an array of objects like this: "[{Object1 :value 1}, {Object2 :value 2}]." This format ensures proper parsing by Appwrite. No specific documentation on array parsing is available.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more