My JSON array is structured like this:
{\"data\":[{\"Chris\":[{\"long\":10,\"lat\":19}]},{\"Scott\":[{\"long\":9,\"lat\":18}]}]}
In the ruby pr
username = 'Chris'
sections.each do |user_coords|
user_coords.each do |user, coords|
if user == username then
coords.each do |lat_long|
lat_long['lat'] = 123 # Your value here...
lat_long['long'] = 456 # Your value here...
end
end
end
end
sections.to_json # => '[{"Chris":[{"long":456,"lat":123}]}...]'