Reputation: 17952
If I receive data from a server in plain JSON that looks like this:
{
"f223dc3c-946f-4da3-8e77-e8c1fe4d241b": {
"name": "Dave",
"age": 16,
"jobs": [{
"description": "Sweep the floor",
"difficulty": 4
},{
"description": "Iron the washing",
"difficulty": 6
}]
},
"84af889a-8fc9-499b-a6ea-97e7a483130c": {
...
}
}
Do I need to loop through all the jobs
and convert them to Map
s, then convert each object's jobs
into a List
, then the entire thing into a Map
?
Or does ImmutableJS do this all recursively for me?
Upvotes: 0
Views: 69