Let's say I have some data in a database that looks like this.
person = {
id: 0,
name: 'Kyle',
children: [23, 18, 7]
};
child = {
id: 23,
name: 'Colin'
}
If the child is deleted what is the best practice to remove the id reference from the person? Mainly trying to figure out a re-usable way to prune data on the fly without writing a large amount of code.