javascript - Returning a map from setIn -- ImmutableJS -


i'm trying return nested value inside setin, way i'm doing now, i'm accessing value need, need map first. immutable provides this, however, need use immutable.map().map(..) after array. returned value method, doesn't contain values, of should. know way accomplish this? enter image description here

you need pass iterable immutable.map() constructor, otherwise creating empty map.

it's hard precise without more details, assuming 'result' array of resources , need array of resource ids, should work.

let tempstateid = newstate.setin([populatekey, 'íds'], immutable.map(result).map(resource => resource.id)) 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -