How can I set a deeply nested value in Immutable.js?

Maps in Immutable have a setIn method that makes it easy to set deep values:

peopleImmutable = peopleImmutable.setIn(["Thomas", "nickname"], "Mr. T");

Or, using split to generate the array:

peopleImmutable = peopleImmutable.setIn("Thomas.nickname".split("."), "Mr. T");

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)