def foo(val)
{
one: [["one1", "1"]],
two: [
["two1", "1"],
["two2", "2"]],
}[val]
end
我想从“1”中检索“two1”,我该怎么做?
注意:我想做 [:two]["1"]
def foo(val)
{
one: [["one1", "1"]],
two: [
["two1", "1"],
["two2", "2"]],
}[val]
end
我想从“1”中检索“two1”,我该怎么做?
注意:我想做 [:two]["1"]