{"ScriptPreparationCode":"var INDICATOR = \u0027indicator\u0027;\r\nvar prunedInstances = {\r\n a: { state: { show: false }, id: \u0027boo\u0027 },\r\n b: { state: { show: true, display: INDICATOR }, id: \u0027foo\u0027 },\r\n c: { state: { show: true, display: INDICATOR }, id: \u0027fooC\u0027 },\r\n d: { state: { show: true, display: INDICATOR }, id: \u0027fooD\u0027 },\r\n e: { state: { show: false, display: INDICATOR }, id: \u0027fooE\u0027 },\r\n};\r\n\r\nvar valsArr = Object.values(prunedInstances);\r\nvar keysArr = Object.keys(prunedInstances);\r\n","TestCases":[{"Name":"reduce","Code":"valsArr.reduce((acc, cur) =\u003E {\r\n if (cur.state.show \u0026\u0026 cur.state.display === INDICATOR) {\r\n return cur.id;\r\n }\r\n}, []);","IsDeferred":false},{"Name":"filter","Code":"keysArr.filter((id) =\u003E {\r\n const instance = prunedInstances[id];\r\n return instance.state.show \u0026\u0026 instance.state.display === INDICATOR;\r\n });","IsDeferred":false}]}