How do I find duplicate key values in the listMap contained in ArrayList<HashMap<String, String>>?
if the listMap is like below, the key DATA_ID =01 is duplicated. How do I extract only the duplicate data? ex. [{TIMESTAMP=2024-03-28 00:00:27.925321, DATA_ID=01, VALUE=-273.15, INFO_SEQ=24668992}, {TIMESTAMP=2024-03-28 00:01:30.925321, DATA_ID=01, VALUE=-275.15, NFO_SEQ=24668992},{TIMESTAMP=2024-03-28 00:01:31.452321, DATA_ID=02, VALUE=-275.15, NFO_SEQ=24668992}]
i'm trying to find duplicate data and calculate the corresponding values.
You could use a new Map to do so, let's call it:
dataIdMap