I'm trying to update a nested object in the firestore DB I'm using the web SDK. Here is the format of the object that I wish to update:
{
"name": "Math",
"sections": {
"section1": {
"sectionName": "Introduction",
"lessonsObj": {
"1": {
"pageResource": "page resource",
"title": "Intro"
}
}
}
},
"description": "Lorem ipsum."
}
I'd like to update the title property for the first lesson in the lessonsObj object. The values for section1
, and the lesson key number 1
will be dynamic, but I'm not sure how I can do this?
Here is the screenshot of the structure in FB Firestore: