Java faster than 98%
\nclass Solution {\n    public int countMatches(List<List<String>> items, String ruleKey, String ruleValue) {\n        \n        int index = -1; \n        int c
```\nclass Solution {\n    public int countMatches(List<List<String>> items, String ruleKey, String ruleValue) {\n        \n        int index = -1; \n        int count = 0;\n        \n        \n        if(ruleKey.equals("type")) index = 0; \n        else if (ruleKey.equals("color")) index = 1;\n        else index = 2; \n        \n        \n        for(List<String> list : items){\n            if(list.get(index).equals(ruleValue))  count++;\n            \n        }\n        return count;            \n        \n    }\n}\n```
['Java']