import { Array, split } from "lib/Array.cms"; categoryMap = { "a1": "a", "a2": "a", "b1": "b", "b2": "b", "b3": "b", "b4": "b", "b5": "b", "c1": "c", "c2": "c", "c3": "c", "c4": "c" }; for (y = 1; y <= Bottom; y++) { data = split([x,y], "/"); categories = new Array(); result = new Array(); for (i = 0; i < data.length; i++) { category = categoryMap[data[i]]; if (!categories.includes(category)) { categories.push(category); result.push(data[i]); } } [x,y] = result.join("/"); }