See example below (json format from mongochef). I need to add a new field to each element in our collection called isReadOnly (bool). How would I do this? I can easily add it to the root of the document but battling to do it within each array element.
{
"_id" : "fda42f22-0fa4-4e4a-94bf-245b1124c8b9",
"_t" : "FullConfiguration",
"DeviceConfigName" : "Illinois",
"Elements" : [
{
"_t" : "NumberConfigurationElement",
"AsciiConfigNumber" : NumberInt(10),
"DataType" : NumberInt(1),
"ByteOffset" : NumberInt(0),
"Name" : "alcohol_limit",
"Description" : "The alcohol limit of the device (ug/l)",
"AckResponse" : "HT-CONFG,010,00119",
"DevicePart" : NumberInt(1),
"Value" : NumberInt(119),
"DefaultValue" : NumberInt(119),
"Min" : NumberInt(50),
"Max" : NumberInt(500)
}, .....