title: Firebase change objects inside map dynamically
body: <p><strong>Firebase Document</strong></p>
  <p><a href="https://i.stack.imgur.com/cFQ4p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cFQ4p.png" alt="Firebase Data Structure" /></a></p>
  <p><strong>Flutter code that rewrites every item in the tripAttractions map</strong></p>
  <pre><code>  docRef = db.collection(&quot;trips&quot;).doc(tripId);
    batch.update(
        docRef,
        ({
          'title': title,
          'imageURL': tripImagePath,
          'location': location,
          'startDate':
              DateFormat('yyyy-MM-dd').format(DateTime.parse(startDate)),
          'endDate': DateFormat('yyyy-MM-dd').format(DateTime.parse(endDate)),
          'tripAttractionsv2': {
            for (var item in dateIds) '$item': {}
  
            },
        }));
    batch.commit().then((a) {
      print(&quot;Updated trip documents inside collection&quot;);
    });
  }
  </code></pre>
  <p>}</p>
  <p><strong>How can I only remove and add some of the dates in tripAttraction based on the start and endDate without rewriting all the dates?</strong> Ex. start date is changed to 2021-11-20 and endDate changed to 2021-11-26, it should only delete the 2021-11-19 object and add 2021-11-26.</p>