Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
javascriptまたはjQueryに変換する方法はあります"["item1","item2"]"か?["item1","item2"]
"["item1","item2"]"
["item1","item2"]
JSON.parse('["item1","item2"]');
または、下位の IE をサポートするために本当に必要な場合:
$.parseJSON('["item1","item2"]');
replace()を使用できます。
ライブデモ
str = str.replace('"[', '[').replace(']"' , ']');