-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
How can I add more items to a Feature property Hash?
Using merge! does not seem to work
irb(main):001:0> ff = RGeo::GeoJSON.decode(Scenario.find(11).polygon)
=> #<RGeo::GeoJSON::FeatureCollection:0x724c>
irb(main):002:0> ff[0].properties
=> {"myType"=>"base_area"}
irb(main):005:0> ff[0].properties.merge!("k"=>"22")
=> {"myType"=>"base_area", "k"=>"22"}
irb(main):006:0> ff[0].properties
=> {"myType"=>"base_area"}Which works in a 'normal' Hash
nn = Hash.new
=> {}
irb(main):041:0> nn.merge!("k"=>"22")
=> {"k"=>"22"}
irb(main):042:0> nn
=> {"k"=>"22"}Metadata
Metadata
Assignees
Labels
No labels