I’m trying to update an item in a array nested in an object. I just can’t seem to figure it out. Seems like this is something simple that i’m missing.
Is it possible to access an array item with the Update function?
Given this data I would like to update bar at index 0 to baz:false.
doc: data:{ foo:"hello", bar:[{baz:true},{baz:false}], }
Query( Lambda( ["docRef", "index"], Update(Var("docRef"), { data: { bar[Var("index")]:{baz:true}} }) ) )
This is what I originally thought it would be like.
Any help is very appreciated.