An easy and understandable solution[Java]
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\nRuntime: 3 ms      Beats :98.62%\nMemory: 46.9 MB    Beats :91.92%\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public static int countMatches(List<List<String>> items, String ruleKey, String ruleValue) {\n        int count1 = 0;\n\n        int tcn = getTCN(ruleKey);\n        for (int count = 0; count < items.size(); count++) {\n            String s = items.get(count).get(tcn);\n            if(ruleValue.equals(s)){\n                count1++;\n            }\n\n\n\n        }\n\n        return count1;\n    }\n    public static int getTCN(String ruleKey){\n        return switch (ruleKey) {\n            case "type" -> 0;\n            case "color" -> 1;\n            case "name" -> 2;\n            default -> -1;\n        };\n    }\n}\n```
['Array', 'String', 'Java']