I have an array that is in string form
"[{"img_type":"HA","img_size":0,"img_name":"8a040ff1-e780-4843-9f01-6dc37e11f3c8"},{"img_type":"HB","img_size":0,"img_name":"8a040ff1-e780-4843-9f01-6dc37e11f3c8"}]"
I need to convert that to
[
{"img_type": "HA", "img_size": 0, "img_name": "8a040ff1-e780-4843-9f01-6dc37e11f3c8"},
{"img_type": "HB", "img_size": 0, "img_name": "8a040ff1-e780-4843-9f01-6dc37e11f3c8"}
]
I tried removing double quotes, but it didn't work. How can I convert this to an array?
evalJSON.parse(str).map(&:symbolize_keys)in Rails