假設我有此數組哈希:紅寶石容易尋找鍵值對的哈希
[
{"href"=>"https://company.campfirenow.com", "name"=>"Company", "id"=>123456789, "product"=>"campfire"},
{"href"=>"https://basecamp.com/123456789/api/v1", "name"=>"Company", "id"=>123456789, "product"=>"bcx"},
{"href"=>"https://company.highrisehq.com", "name"=>"Company", "id"=>123456789, "product"=>"highrise"}
]
我如何解析「HREF」的哈希值,其中「產品」 =>「bcx」
有什麼簡單的方法可以在Ruby中做到這一點?
編輯該問題,因爲它與JSON沒有任何關係。 –