Reputation: 391
I am new to flutter as well as firebase and have structured my data as follows:
{
"a": {
"b" : [ {
"property1" : value1,
"property2" : value2
}, {
"property1" : value3,
"property2" : value4
}]
}
}
Firebase database has numbered my array objects as 0,1
As you can see b contains array of objects, how do I create a query if I want to update a value in object which contains property2 value as value2 ? Do I have to modify my database structure?
Upvotes: 1
Views: 609
Reputation: 317427
You won't be able to do this with a single update. You're going to have to:
a/b/{child}
.Upvotes: 3