ruby-detect
0pt
hoge = [{"hh_val" => 10, "mm_val" => 49}, {"hh_val" => 30, "mm_val" => 106}] puts hoge.detect{|h| h['hh_val'] > 20} > {"hh_val"=>30, "mm_val"=>106}
※ "find" の別名
0pt
hoge = [{"hh_val" => 10, "mm_val" => 49}, {"hh_val" => 30, "mm_val" => 106}] puts hoge.detect{|h| h['hh_val'] > 20} > {"hh_val"=>30, "mm_val"=>106}
※ "find" の別名
コメントはまだありません