I would like to implement a search filter in my adapter class (used in a fragment class showing a list of colors), but although I managed to do it for simpler examples, I do
Change the code from get(i) to getJSONObject(i) like below and try.If error is still there then you need to check the logs and post the logs.
for(int i = 0; i<colorList.length(); i++){
try {
filterableString = ((JSONObject) colorList.getJSONObject(i)).getString("Name");
} catch (JSONException e) {
e.printStackTrace();
}