HI I had received this kind of data from API (photo below). Somehow I had tried many methods but all not worked out. Is there any method that I can use and how to code using Dart for this kind of data that can trace data incoming and list according to ID ? thank you

{"id": "1", "name": "item1"},
{"id": "2", "name": "item2"},
{"id": "3", "name": "item3"},
{"id": "4", "name": "item4"},
------------------------------
{"id": "2", "name": "item5"},
{"id": "4", "name": "item6"},
{"id": "1", "name": "item7"},
{"id": "1", "name": "item8"},
{"id": "3", "name": "item9"},
{"id": "3", "name": "item10"},
{"id": "5", "name": "item11"},
{"id": "2", "name": "item12"},

What I was expecting is data name will keep update new if id is same.

[{"id": "1", "name": "item8"},
{"id": "2", "name": "item12"},
{"id": "3", "name": "item10"},
{"id": "4", "name": "item6"}]