Hi all!
I hope this is the right place to ask my question.
I’m trying to get information about my droplets on DigitalOcean.
Information comes as array of hashes:
[{“id”=>1,
“name”=>“MyTestDroplet”,
“image_id”=>6918990,
“size_id”=>66,
“region_id”=>9,
“backups_active”=>false,
“ip_address”=>“1.1.1.1”,
“private_ip_address”=>nil,
“locked”=>false,
“status”=>“off”,
“created_at”=>“2014-12-08T15:40:09Z”},
{“id”=>2,
“name”=>“MyTestDroplet2”,
“image_id”=>6918990,
“size_id”=>66,
“region_id”=>7,
“backups_active”=>false,
“ip_address”=>“2.2.2.2”,
“private_ip_address”=>nil,
“locked”=>false,
“status”=>“off”,
“created_at”=>“2014-12-09T19:27:34Z”}]
My question is how can I get values of specific keys of both hashes?
I need to get information like this:
1
MyTestDroplet
1.1.1.1
2
MyTestDroplet2
2.2.2.2
And number of hashes can be any (as well as number of droplets on
DigitalOcean).
Thank you in advance!