{"ScriptPreparationCode":"var x = {\r\n \u0022servicesSummary\u0022: [\r\n {\r\n \u0022serviceGroup\u0022: \u0022Publicacion_Ofertas\u0022,\r\n \u0022availableCredits\u0022: 3\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Identidades_Generales\u0022,\r\n \u0022availableCredits\u0022: 400\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Identidades_por_Categoria\u0022,\r\n \u0022availableCredits\u0022: 0\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Reportes_PDA\u0022,\r\n \u0022availableCredits\u0022: 11\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Ofertas_Destacadas\u0022,\r\n \u0022availableCredits\u0022: 0\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Ofertas_Premium\u0022,\r\n \u0022availableCredits\u0022: 0\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Ofertas_Destacadas_Premium\u0022,\r\n \u0022availableCredits\u0022: 0\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Nota_de_Credito\u0022,\r\n \u0022availableCredits\u0022: 0\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Descuento\u0022,\r\n \u0022availableCredits\u0022: 0\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Servicios_MyOCC\u0022,\r\n \u0022availableCredits\u0022: 0\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022HELLO_English_Course\u0022,\r\n \u0022availableCredits\u0022: 0\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Curriculo_Confidencial\u0022,\r\n \u0022availableCredits\u0022: 0\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Result_Placement_Test\u0022,\r\n \u0022availableCredits\u0022: 0\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Reporte_PDA_Candidato\u0022,\r\n \u0022availableCredits\u0022: 0\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Perfiles_Mercer\u0022,\r\n \u0022availableCredits\u0022: 0\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022HELLO_Course_Pack\u0022,\r\n \u0022availableCredits\u0022: 0\r\n },\r\n {\r\n \u0022serviceGroup\u0022: \u0022Publicaciones_Destacadas_Premium\u0022,\r\n \u0022availableCredits\u0022: 0\r\n }\r\n ]\r\n}","TestCases":[{"Name":"Filter","Code":"const y = x.servicesSummary.filter((element) =\u003E {\r\n switch (element.serviceGroup) {\r\n case \u0027Publicacion_Ofertas\u0027:\r\n return {publish: element.availableCredits};\r\n case \u0027Ofertas_Destacadas\u0027:\r\n return {outstanding: element.availableCredits};\r\n case \u0027Publicaciones_Destacadas_Premium\u0027:\r\n return {premium: element.availableCredits}\r\n default: \r\n }\r\n });","IsDeferred":false},{"Name":"Foreach","Code":"const credits = { outstanding: 0, publish: 0, premium: 0 };\r\nx.servicesSummary.forEach(element =\u003E {\r\n switch (element.serviceGroup) {\r\n case \u0027Publicacion_Ofertas\u0027:\r\n credits.publish = element.availableCredits;\r\n break;\r\n case \u0027Ofertas_Destacadas\u0027:\r\n credits.outstanding = element.availableCredits;\r\n break;\r\n case \u0027Publicaciones_Destacadas_Premium\u0027:\r\n credits.premium = element.availableCredits;\r\n break;\r\n default: break;\r\n }\r\n });","IsDeferred":false}]}