{"ScriptPreparationCode":null,"TestCases":[{"Name":"Array some","Code":"const referenceArray = [\r\n {id:1},{id:2},{id:3},{id:4},{id:5},{id:6},{id:7},{id:8},{id:9},{id:0}\r\n];\r\nconst inputArray = [\r\n {id:5},{id:1},{id:10},{id:9},{id:5},{id:2},{id:17},{id:0},{id:4},{id:0}\r\n];\r\ninputArray.map(inp =\u003E ({...inp, isExisting: referenceArray.some(refA =\u003E refA.id === inp.id)}));","IsDeferred":false},{"Name":"Map has","Code":"const referenceArray = [\r\n {id:1},{id:2},{id:3},{id:4},{id:5},{id:6},{id:7},{id:8},{id:9},{id:0}\r\n];\r\nconst inputArray = [\r\n {id:5},{id:1},{id:10},{id:9},{id:5},{id:2},{id:17},{id:0},{id:4},{id:0}\r\n];\r\nconst x = referenceArray.reduce((mapI, inp) =\u003E mapI.set(inp.id,inp), new Map());\r\ninputArray.map(inp =\u003E ({...inp, isExisting: x.has(inp.id)}));","IsDeferred":false}]}