{"ScriptPreparationCode":null,"TestCases":[{"Name":"obj key","Code":"const array = [\r\n { id: 1, name: \u0022John\u0022, age: 25 },\r\n { id: 2, name: \u0022Jane\u0022, age: 30 },\r\n { id: 3, name: \u0022Bob\u0022, age: 40 },\r\n { id: 4, name: \u0022Alice\u0022, age: 35 },\r\n { id: 5, name: \u0022Tom\u0022, age: 28 },\r\n { id: 6, name: \u0022Emily\u0022, age: 32 },\r\n { id: 7, name: \u0022Peter\u0022, age: 45 },\r\n { id: 8, name: \u0022Amy\u0022, age: 27 },\r\n { id: 9, name: \u0022David\u0022, age: 38 },\r\n { id: 10, name: \u0022Sarah\u0022, age: 33 },\r\n { id: 11, name: \u0022Mike\u0022, age: 29 },\r\n { id: 12, name: \u0022Sara\u0022, age: 36 },\r\n { id: 13, name: \u0022Jack\u0022, age: 42 },\r\n { id: 14, name: \u0022Lisa\u0022, age: 26 },\r\n { id: 15, name: \u0022Oliver\u0022, age: 31 },\r\n { id: 16, name: \u0022Grace\u0022, age: 37 },\r\n { id: 17, name: \u0022Tim\u0022, age: 41 },\r\n { id: 18, name: \u0022Eva\u0022, age: 24 },\r\n { id: 19, name: \u0022Harry\u0022, age: 34 },\r\n { id: 20, name: \u0022Mia\u0022, age: 39 },\r\n { id: 21, name: \u0022Alex\u0022, age: 23 },\r\n { id: 22, name: \u0022Laura\u0022, age: 43 },\r\n { id: 23, name: \u0022Max\u0022, age: 44 },\r\n { id: 24, name: \u0022Lucy\u0022, age: 26 },\r\n { id: 25, name: \u0022Luke\u0022, age: 28 },\r\n { id: 26, name: \u0022Emma\u0022, age: 30 },\r\n { id: 27, name: \u0022Ryan\u0022, age: 36 },\r\n { id: 28, name: \u0022Liam\u0022, age: 29 },\r\n { id: 29, name: \u0022Sophie\u0022, age: 31 },\r\n { id: 30, name: \u0022Daniel\u0022, age: 33 },\r\n { id: 31, name: \u0022Hannah\u0022, age: 27 },\r\n { id: 32, name: \u0022William\u0022, age: 40 },\r\n { id: 33, name: \u0022Chloe\u0022, age: 32 },\r\n { id: 34, name: \u0022Eric\u0022, age: 45 },\r\n { id: 35, name: \u0022Lily\u0022, age: 38 },\r\n { id: 36, name: \u0022Finn\u0022, age: 42 },\r\n { id: 37, name: \u0022Ava\u0022, age: 35 },\r\n { id: 38, name: \u0022Leo\u0022, age: 24 },\r\n { id: 39, name: \u0022Julia\u0022, age: 37 },\r\n { id: 40, name: \u0022Connor\u0022, age: 28 },\r\n { id: 41, name: \u0022Zoe\u0022, age: 33 },\r\n { id: 42, name: \u0022Henry\u0022, age: 41 },\r\n { id: 43, name: \u0022Molly\u0022, age: 26 },\r\n];\r\n\r\nconst getResult = (id) =\u003E {\r\n return array.find((item) =\u003E {\r\n return item.id === id ? item : null;\r\n });\r\n};\r\n\r\ngetResult(43)","IsDeferred":false},{"Name":"array.find ","Code":"const obj = {\r\n 1: { name: \u0022John\u0022, age: 25 },\r\n 2: { name: \u0022Jane\u0022, age: 30 },\r\n 3: { name: \u0022Bob\u0022, age: 40 },\r\n 4: { name: \u0022Alice\u0022, age: 35 },\r\n 5: { name: \u0022Tom\u0022, age: 28 },\r\n 6: { name: \u0022Emily\u0022, age: 32 },\r\n 7: { name: \u0022Peter\u0022, age: 45 },\r\n 8: { name: \u0022Amy\u0022, age: 27 },\r\n 9: { name: \u0022David\u0022, age: 38 },\r\n 10: { name: \u0022Sarah\u0022, age: 33 },\r\n 11: { name: \u0022Mike\u0022, age: 29 },\r\n 12: { name: \u0022Sara\u0022, age: 36 },\r\n 13: { name: \u0022Jack\u0022, age: 42 },\r\n 14: { name: \u0022Lisa\u0022, age: 26 },\r\n 15: { name: \u0022Oliver\u0022, age: 31 },\r\n 16: { name: \u0022Grace\u0022, age: 37 },\r\n 17: { name: \u0022Tim\u0022, age: 41 },\r\n 18: { name: \u0022Eva\u0022, age: 24 },\r\n 19: { name: \u0022Harry\u0022, age: 34 },\r\n 20: { name: \u0022Mia\u0022, age: 39 },\r\n 21: { name: \u0022Alex\u0022, age: 23 },\r\n 22: { name: \u0022Laura\u0022, age: 43 },\r\n 23: { name: \u0022Max\u0022, age: 44 },\r\n 24: { name: \u0022Lucy\u0022, age: 26 },\r\n 25: { name: \u0022Luke\u0022, age: 28 },\r\n 26: { name: \u0022Emma\u0022, age: 30 },\r\n 27: { name: \u0022Ryan\u0022, age: 36 },\r\n 28: { name: \u0022Liam\u0022, age: 29 },\r\n 29: { name: \u0022Sophie\u0022, age: 31 },\r\n 30: { name: \u0022Daniel\u0022, age: 33 },\r\n 31: { name: \u0022Hannah\u0022, age: 27 },\r\n 32: { name: \u0022William\u0022, age: 40 },\r\n 33: { name: \u0022Chloe\u0022, age: 32 },\r\n 34: { name: \u0022Eric\u0022, age: 45 },\r\n 35: { name: \u0022Lily\u0022, age: 38 },\r\n 36: { name: \u0022Finn\u0022, age: 42 },\r\n 37: { name: \u0022Ava\u0022, age: 35 },\r\n 38: { name: \u0022Leo\u0022, age: 24 },\r\n 39: { name: \u0022Julia\u0022, age: 37 },\r\n 40: { name: \u0022Connor\u0022, age: 28 },\r\n 41: { name: \u0022Zoe\u0022, age: 33 },\r\n 42: { name: \u0022Henry\u0022, age: 41 },\r\n 43: { name: \u0022Molly\u0022, age: 26 },\r\n};\r\n\r\nconst getResult = (id) =\u003E {\r\n return obj[id] ? obj[id] : null;\r\n};\r\n\r\n\r\ngetResult(\u002743\u0027)\r\n","IsDeferred":false}]}