我有一个哈希:
a = {
"person" => [
{
"age" => ["0"],
"details" => [
{
"hobby" => ["6"],
"interest" => ["programming"]
}
]
}
]
}
我想获得“细节”的价值。最简单的方法是
a["person"].first["details"].first
但是,它太长了,看起来不太好。我还有其他方法可以做到这一点吗?