0

how to parsing string contain list of map in dart / flutter. For example I am trying to converting this

"[{"index":19,"id":"09bf43c4-adce-4dfa-afea-2757283d76b9","lat":-7.51999046,"long":110.26681716},{"index":20,"id":"31fbd8d5-373d-46bf-bc3b-c1d072a5cf0f","lat":-7.51999046,"long":110.26681716}]"

to

[
      {
        "index": 19,
        "id": "09bf43c4-adce-4dfa-afea-2757283d76b9",
        "lat": -7.51999046,
        "long": 110.26681716
      },
      {
        "index": 20,
        "id": "31fbd8d5-373d-46bf-bc3b-c1d072a5cf0f",
        "lat": -7.51999046,
        "long": 110.26681716
      }
];

I really appreciate for all of your responses. Thank you

Philip Purwoko
  • 407
  • 5
  • 20

1 Answers1

2

you can use the json.decode function.

See this question for more information how to convert json string to json object in dart flutter?

Ali
  • 159
  • 1
  • 1
  • 7