{"ScriptPreparationCode":"var itemsArray = [];\r\nvar itemsObj = {};\r\n\r\nfor (let i = 0; i \u003C 100000; i\u002B\u002B) {\r\n\titemsArray.push({\r\n \tid: i,\r\n \tauthor: \u0027Robert\u0027 \u002B i,\r\n })\r\n itemsObj = {...itemsObj, [i]: {id: i, author: \u0027Robert\u0027 \u002B i}}\r\n}","TestCases":[{"Name":"Get value in object by key","Code":"console.log(\u0027itemsObj \u0027, itemsObj[59430])","IsDeferred":false},{"Name":"Get value by filtering array","Code":"console.log(itemsArray.filter(item =\u003E item.id === 59430)[0])","IsDeferred":false},{"Name":"Get value by mapping array","Code":"itemsArray.map(item =\u003E {\r\n\tif (item.id === 59430) {\r\n \tconsole.log(item)\r\n }\r\n})","IsDeferred":false},{"Name":"Get value by forEach array","Code":"itemsArray.forEach(item =\u003E {\r\n\tif (item.id === 59430) {\r\n \tconsole.log(item)\r\n }\r\n})","IsDeferred":false},{"Name":"Get value by forEach lodash array","Code":"_.forEach(itemsArray, item =\u003E {\r\n\tif (item.id === 59430) {\r\n \tconsole.log(item)\r\n }\r\n})","IsDeferred":false},{"Name":"Get value by forEach object","Code":"_.forEach(itemsObj, (value ,key) =\u003E {\r\n\tif (key === 59430) {\r\n \tconsole.log(value)\r\n }\r\n})","IsDeferred":false},{"Name":"Get value by forEach in value object","Code":"_.forEach(itemsObj, (value ,key) =\u003E {\r\n\tif (value.id === 59430) {\r\n \tconsole.log(value)\r\n }\r\n})","IsDeferred":false},{"Name":"Get value by lodash filter in value object","Code":"console.log(_.filter(itemsObj, value =\u003E value.id \u003E 75001))","IsDeferred":false},{"Name":"Get value by filter in value array","Code":"console.log(itemsArray.filter(value =\u003E value.id \u003E 75001))","IsDeferred":false},{"Name":"Get value by lodash filter in value array","Code":"console.log(_.filter(itemsArray, value =\u003E value.id \u003E 75001))","IsDeferred":false}]}