I'm using a reducer
state, which contains an object in this format:
x = {10: {nome: 'lucas'}, 20:{nome: 'beraldo'}} <br/>
And, I get an id via action.
I would like to do something like array.filter
, or delete
only dynamically on this object, to remove an item, for example:
delete x.actionID
But he can not understand action.ID
, since he's coming from the action.
If it were an array, it would x = x.filter(nome != action.id)
, but as it is object, I do not know how I can treat it.