Says my state is like this:
state
{ item:{ a:\'a\', b:\'b\' } }
Then I\'m able to pull a from item by d
a
As 4castle pointet out, you could use Computed object property names and destructuring with an additional key/value pair variables for destructuring.
var object = { item: { a: 'a0', b: 'b0' } }, key = 'b', value; ({ [key]: value } = object.item); console.log(value);