cartodb-4.42/config/initializers/hash.rb
2024-04-06 05:25:13 +00:00

7 lines
112 B
Ruby

class Hash
def convert_nulls
self.inject({}){|h,(k,v)| h[k] = (v == "null" ? nil : v); h }
end
end