A very nice method to convert a Ruby array to Javascript.
print { 'key1' => 'value1', 'key2' => [ 1, 2, 3 ] }.to_json outputs: { key1: 'value1', key1: [ 1, 2, 3 ] }
A very nice method to convert a Ruby array to Javascript.
print { 'key1' => 'value1', 'key2' => [ 1, 2, 3 ] }.to_json outputs: { key1: 'value1', key1: [ 1, 2, 3 ] }