假设我有这种状态:
{
"appointments": {
"ids": [...],
"entities": [
"0": {
...
mandatoryRecipients: ['0','3']
},
"1": {
...
mandatoryRecipients: ['1','2','0']
}
]
},
"recipients": {
"ids": [...],
"entities": [
"0": {
...
id: '0',
name: 'foo'
},
"1": {
...
id: '1',
name: 'foobar'
},
"2": {
...
id: '2',
name: 'bar'
}
]
}
}
在某个时刻,我需要在约会实体的“mandatoryRecipients”数组中添加一个值。我知道这种状态没有被规范化,但我怎样才能将它规范化以完成多对多关系?