React Addon Update
import update from 'react-addons-update'; const newData = update(myData, { x: {y: {z: {$set: 7}}}, a: {b: {$push: [9]}}});
Clumsy Cormorant
import update from 'react-addons-update'; const newData = update(myData, { x: {y: {z: {$set: 7}}}, a: {b: {$push: [9]}}});
const initialArray = [1, 2, 3];const newArray = update(initialArray, {$push: [4]}); // => [1, 2, 3, 4]