fork download
  1. process.stdin.resume();
  2. process.stdin.setEncoding('utf8');
  3.  
  4. let x = {"a": [{"b" :2}]};
  5.  
  6. //x['a'][0]['b'] = 20;
  7. for (var v in x['a'][0])
  8. {
  9. x['a'][0][v] = 111;
  10.  
  11. }
  12.  
  13. console.log(x);
  14.  
  15. // your code goes here
  16.  
Success #stdin #stdout 0.05s 42364KB
stdin
Standard input is empty
stdout
{ a: [ { b: 111 } ] }