{"ScriptPreparationCode":null,"TestCases":[{"Name":"filter","Code":"var obj1 = {test1: [{prop1: \u0027test1\u0027, enabled: true}, {prop1: \u0027test2\u0027, enabled: false}, {prop1: \u0027test3\u0027, enabled: true}], test2: [{prop1: \u0027test1\u0027, enabled: false}, {prop1: \u0027test2\u0027, enabled: false}, {prop1: \u0027test3\u0027, enabled: true}, {prop1: \u0027test4\u0027, enabled: true}], test3: [{prop1: \u0027test1\u0027, enabled: false}, {prop1: \u0027test2\u0027, enabled: false}, {prop1: \u0027test3\u0027, enabled: false}, {prop1: \u0027test4\u0027, enabled: true}, {prop1: \u0027test4\u0027, enabled: false}]};\r\nvar count = 0;\r\nfor(var key in obj1) {\r\n if(obj1.hasOwnProperty(key)){\r\n count \u002B= obj1[key].filter(p =\u003E p.enabled).length;\r\n }\r\n}","IsDeferred":false},{"Name":"forEach","Code":"var obj1 = {test1: [{prop1: \u0027test1\u0027, enabled: true}, {prop1: \u0027test2\u0027, enabled: false}, {prop1: \u0027test3\u0027, enabled: true}], test2: [{prop1: \u0027test1\u0027, enabled: false}, {prop1: \u0027test2\u0027, enabled: false}, {prop1: \u0027test3\u0027, enabled: true}, {prop1: \u0027test4\u0027, enabled: true}], test3: [{prop1: \u0027test1\u0027, enabled: false}, {prop1: \u0027test2\u0027, enabled: false}, {prop1: \u0027test3\u0027, enabled: false}, {prop1: \u0027test4\u0027, enabled: true}, {prop1: \u0027test4\u0027, enabled: false}]};\r\nvar count = 0;\r\nfor(var key in obj1) {\r\n if(obj1.hasOwnProperty(key)){\r\n obj1[key].forEach(p =\u003E {\r\n \tif(p.enabled) {\r\n \u002B\u002Bcount;\r\n }\r\n })\r\n }\r\n}","IsDeferred":false}]}