I have and Android App (java) that accesses firestore documents that comprise of an array field as shown:
{
cards:
[
{
reference: "",
response: {
text: "",
title: "",
},
timestamp: ""
},
{
reference: "",
response: {
text: "",
title: "",
},
timestamp: ""
},
.... and so on
I would like to update specific fields of each array element, like "response" : "text" and "response" : "title". What is the best way to achieve this?
I have read in several places that arrays cannot be updated at element level and that I may have to completely overwrite the entire array. Is that true? Is so, how can I construct my update statement in Android (Java) for the same?
Thanks,
AB
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…