MongoDB does not allow field names that start with $ or contain .. We can encounter these when caching the stats data, where we use survey answers as keys (with tallies as the values) and might see free-form text answers. To be safe, we escape both of those characters anywhere in the field name, along with \, so we can go back and forth easily.
MongoDB does not allow field names that start with
$
or contain.
. We can encounter these when caching the stats data, where we use survey answers as keys (with tallies as the values) and might see free-form text answers. To be safe, we escape both of those characters anywhere in the field name, along with\
, so we can go back and forth easily./cc @hampelm