-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not updating value inside Map #44
Comments
and tried like this also : map.set(['b','d'], function(value) { return 1000; }) |
Since that value is a mutable object, not an immutable map, the immutable API does not apply to it (see Object's API). If your update backs up one level, then it points to the object instead of the key within the object:
However, note that this has mutated a mutable value, which your original You could also return a copy of this object:
And now
|
Hai all,
Iam having a map like : var map = Immutable.Map({a:1, b:{d:2}, c:3});
now i want to update value of 'd'...and i tried the following :
2.map = map.updateIn(['b', 'd'], function(value) { return 1000; });// i know it is for nested map...
and not able to update ...so could you please suggest me how to update that value
The text was updated successfully, but these errors were encountered: