{"ScriptPreparationCode":"var items = Array.from(Array(1000), (_, x) =\u003E ({\r\n key: x,\r\n value1: Math.random() * 1000,\r\n value2: Math.random() * 1000\r\n}));\r\n\r\nvar objContainer = {};\r\nvar arrContainer = [];\r\n\r\nfor (let i = 100; i \u003E= 0; i--) {\r\n const index = Math.floor(Math.random() * 1000);\r\n const item = items[index];\r\n objContainer[item.key] = item;\r\n arrContainer.push(item)\r\n}","TestCases":[{"Name":"Get array of keys with value 1 between 0 and 499, and value 2 between 500 and 999 in Object","Code":"var result = [];\r\nfor (var k in objContainer) {\r\n\tif (objContainer[k].value1 \u003E= 0 \u0026\u0026 objContainer[k].value1 \u003C= 499 \u0026\u0026 objContainer[k].value2 \u003E= 500 \u0026\u0026 objContainer[k].value2 \u003C= 999) {\r\n result.push(k);\r\n }\r\n}","IsDeferred":false},{"Name":"Get array of keys with value 1 between 0 and 499, and value 2 between 500 and 999 in Array","Code":"var result = [];\r\nfor (var item of arrContainer) {\r\n\tif (item.value1 \u003E= 0 \u0026\u0026 item.value1 \u003C= 499 \u0026\u0026 item.value2 \u003E= 500 \u0026\u0026 item.value2 \u003C= 999) {\r\n result.push(item.key);\r\n }\r\n}","IsDeferred":false}]}