{"ScriptPreparationCode":"var items = [{name: \u0027name1\u0027, value: 1},{name: \u0027name2\u0027, value: 1},{name: \u0027name3\u0027, value: 1},{name: \u0027name4\u0027, value: 1}];\r\nvar search = \u0027name4\u0027;\r\nvar result = [];","TestCases":[{"Name":"findIndex \u002B toSpliced","Code":"var index = items.findIndex(({name}) =\u003E name === search);\r\nif (index \u003E= 0) {\r\n result = items.toSpliced(index, 1, {...items[index], value: 2});\r\n}","IsDeferred":false},{"Name":"map","Code":"result = items.map(item =\u003E item.name === search ? {...item, value: 2} : item)","IsDeferred":false}]}