{"ScriptPreparationCode":"groupedObj = {\r\ngoogle:[\r\n {external_cal: \u0027google\u0027, name: \u0027Contacts\u0027},\r\n {external_cal: \u0027google\u0027, name: \u0027MyCalendar\u0027},\r\n {external_cal: \u0027google\u0027, name: \u0027Holidays\u0027},\r\n],\r\nnone: [ {external_cal: \u0027none\u0027, name: \u0027My calendar\u0027},],\r\nms:[\r\n {external_cal: \u0027ms\u0027, name: \u0027Outlook 1\u0027},\r\n {external_cal: \u0027ms\u0027, name: \u0027Outlook 2\u0027},\r\n]\r\n};\r\navailebleFilters = [\r\n {label: \u0027All calendars\u0027}\r\n];","TestCases":[{"Name":"spread","Code":"Object.keys(groupedObj).forEach((key) =\u003E {\r\n const groupedFilters = groupedObj[key].map(el =\u003E ({\r\n label: el.name\r\n }));\r\n\r\n availebleFilters = [\r\n ...availebleFilters,\r\n {label: key === \u0027none\u0027 ? \u0027Nimble\u0027 : key, isLabel: true},\r\n ...groupedFilters\r\n ];\r\n});","IsDeferred":false},{"Name":"push","Code":"Object.keys(groupedObj).forEach((key) =\u003E {\r\n availebleFilters.push({\r\n label: key === \u0027none\u0027 ? \u0027Nimble\u0027 : key,\r\n isLabel: true\r\n });\r\n const groupedLabels = groupedObj[key].map(el =\u003E ({\r\n label: el.name\r\n }));\r\n groupedLabels.forEach((el) =\u003E {\r\n availebleFilters.push(el);\r\n })\r\n});","IsDeferred":false}]}