嗨,我有一系列哈希,如下所示,
[{"rel"=>"self", "uri"=>"/organizations;start=100;count=100"},
{"rel"=>"nextPage", "uri"=>"/organizations;start=200;count=100"},
{"rel"=>"previousPage", "uri"=>"/organizations;start=0;count=100"}]
现在我必须找到nextPage uri链接。所以我能做到这一点。
答案 0 :(得分:2)
尝试:
data.find { |a| a['rel'] == 'nextPage' }['uri']