{"Adana, Türkiye", "Mersin, Akdeniz/Mersin, Türkiye", "Yozgat, Yozgat Merkez/Yozgat, Türkiye"}
How can I convert this data format to array?
For example:
["Adana, Türkiye",
"Mersin, Akdeniz/Mersin, Türkiye",
"Yozgat, Yozgat Merkez/Yozgat, Türkiye"]
I tried many methods but none worked. I do not think I saw any easy methods to do this.
2
Answers
Hi guys convert it. I used this method but it could be hard way. If you know better answer waiting you good news.
If your
data
is just a simple string and does not contain any other{}
than the starting and ending ones, you could simply doIe, replace the curly braces
{}
with square brackets[]
and do aJSON.parse