Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
How to insert/update Immutable.Map of Immutable.Map in JavaScript?

I have a nested Immutable.Map of Immutable.Map type defined as follows:

export type Data = Immutable.Map<string, Immutable.Map<string, string>>;

const nested : Data = Immutable.Map();

Data in the nested should look like this:

{
  'a': {
    'a1': 'value1',
    'a2': 'value2',
  },
  'b': {
    'b1': 'value1',
    'b2': 'value2',
  },
...
}

How should I insert/update a value for the nested variable (assume I have input like {'a', 'a1', 'value1'})? I know I can do checks and create the second immutable map if it's null, but is there an easier way to do that?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!