{
"id": {
"S": "12345678"
},
"legMap": {
"M": {
"12345678-ARCH-1": {
"M": {
"ata": {
"NULL": true
},
"atd": {
"NULL": true
}
}
},
"12345678-ARCH-2": {
"M": {
"ata": {
"NULL": true
},
"atd": {
"NULL": true
}
}
}
}
}
}
The tree "12345678-ARCH-1" alternatively can have values like this:
"12345678-LEG-1": {
"M": {
"ata": {
"S": "2022-04-11T10:38:00.000Z"
},
"atd": {
"S": "2022-06-11T03:49:00.000Z"
}
}
}
The ConditionExpression should only allow an item to be updated if the tree '{id}-ARCH-{archNumber}' does not have any keys defined. i.e. all keys under "legMap" -> "M" should have value like
"M": { "ata": { "NULL": true }, "atd": { "NULL": true } }
Does PutCommand from '@aws-sdk/lib-dynamodb' allow for nested loops in ConditionExpression parameter? What would the expression look like?