开发中有时遇到会将数组以字符串的形式存在mysql中,取出来的时候怎么再转换为数组呢?
s = '["广东","广州","黄埔"]' s.gsub(/"/,"").gsub(/[[]]/,"").split(",") => ["广东", "广州", "黄埔"]