I have a Ruby array like this in my controller:
@location_list = [ ['Mushrooms', 3], ['Onions', 1], ['Olives', 1], ['Zucchini', 1], ['Pepperoni', 2] ]
And I find it like this in my opinion:
location_list = "<%= @location_list.to_json %>";
But if I do an alert (location_list), I get:
[["Mushrooms",3],["Onions",1],["Olives",1],["Zucchini",1],["Pepperoni",2]]
How to get the corresponding object without these "quot
Hommer smith
source share