ruby - Delete elements from string + transform it into array -
i have string : data = "[\"super\", \"cool!\", \"bien écrit\", \"first!\", \"why speaking french here?\"]"
i transform : data = ["super", "cool!", "bien écrit", "first!", "why speaking french here?"]
parse json. try
require 'json' data = json.parse data
Comments
Post a Comment