{"ScriptPreparationCode":null,"TestCases":[{"Name":"forEach","Code":"const oldState = {\r\n\tentities: [\r\n {SomeProp: \u0027nonsense 1\u0027, SomeOtherProp: \u0027more nonsense 1\u0027, id: 1},\r\n {SomeProp: \u0027nonsense 2\u0027, SomeOtherProp: \u0027more nonsense 2\u0027, id: 2},\r\n {SomeProp: \u0027nonsense 3\u0027, SomeOtherProp: \u0027more nonsense 3\u0027, id: 3},\r\n {SomeProp: \u0027nonsense 4\u0027, SomeOtherProp: \u0027more nonsense 4\u0027, id: 4},\r\n {SomeProp: \u0027nonsense 5\u0027, SomeOtherProp: \u0027more nonsense 5\u0027, id: 5},\r\n {SomeProp: \u0027nonsense 6\u0027, SomeOtherProp: \u0027more nonsense 6\u0027, id: 6},\r\n ]\r\n}; \t\r\nvar oldEntitiesById = new Map();\r\nObject.values(oldState.entities).forEach(e =\u003E oldEntitiesById.set(e.id, e));\r\nconsole.log(oldEntitiesById);","IsDeferred":false},{"Name":"Map","Code":"const oldState = {\r\n\tentities: [\r\n {SomeProp: \u0027nonsense 1\u0027, SomeOtherProp: \u0027more nonsense 1\u0027, id: 1},\r\n {SomeProp: \u0027nonsense 2\u0027, SomeOtherProp: \u0027more nonsense 2\u0027, id: 2},\r\n {SomeProp: \u0027nonsense 3\u0027, SomeOtherProp: \u0027more nonsense 3\u0027, id: 3},\r\n {SomeProp: \u0027nonsense 4\u0027, SomeOtherProp: \u0027more nonsense 4\u0027, id: 4},\r\n {SomeProp: \u0027nonsense 5\u0027, SomeOtherProp: \u0027more nonsense 5\u0027, id: 5},\r\n {SomeProp: \u0027nonsense 6\u0027, SomeOtherProp: \u0027more nonsense 6\u0027, id: 6},\r\n ]\r\n};\r\nconst oldEntitiesById = new Map(oldState.entities.map(element =\u003E [element.id, element]));\r\nconsole.log(oldEntitiesById);","IsDeferred":false}]}