Let say i have this state:
{
"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'
}
]
}
}
At a certain point, I need to add a value into the 'mandatoryRecipients' array of the appointment entity. I know that this state is not normalized but how can I normalize it in order to accomplish a many to many relationship?