I am parsing some JSON data a truck key (id) and a name (value). I put it in a HashMap and I want to display **only** the *Value* in the `ListView`. 

However I keep getting this error

> 
> HashMap cannot be cast to java.util.Map$Entry
> 
> 
> 

on this line: `return (Map.Entry) mArrayList.get(position);` in my TruckAdapter.

***Can anyone see what I am doing wrong?***

Here is the meat of the parsing the JSON, adding it to the ArrayList and then instantiating the listview adapter.

```
private List<HashMap<String, String>>  listTrucks = new ArrayList<HashMap<String, String>>();

    for (int i = 0; i < arrayRecordSet.length(); i++) {
        record = arrayRecordSet.getJSONObject(i);
        map = new HashMap<>();
        map.put("MYKEY", record.getString("SOME TRUCK KEY"));
        map.put("MYVALUE", record.getString("SOME TRUCK VALUE"));

    listTrucks.add(map);
    }

    TruckAdapter truckAdapter = new TruckAdapter(listTrucks);
    lv.setAdapter(truckAdapter);

```

**My Adapter Class**

```
public class TruckAdapter extends BaseAdapter {

        private final ArrayList mArrayList;

        public TruckAdapter(ArrayList<HashMap<String, String>> map){
            mArrayList = map;

        }

        @Override
        public int getCount() {
            return mArrayList.size();
        }

        @Override
        public Map.Entry<String, String> getItem(int position) {
            return (Map.Entry) mArrayList.get(position);
        }

        @Override
        public long getItemId(int position) {
            return 0;
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            final View result;

            if (convertView == null) {
                result = LayoutInflater.from(parent.getContext()).inflate(android.R.layout.simple_list_item_1, parent, false);
            } else {
                result = convertView;
            }

            Map.Entry<String, String> item = getItem(position);

            ((TextView) result.findViewById(R.id.text1)).setText(item.getValue());

            return result;
        }
    }

```

JSON

```
[{"TRKlTruckKey":"1","TRKch10TruckNumber":"Ford"},{"TRKlTruckKey":"2","TRKch10TruckNumber":"Jeep"} ......

```