Ruby中有4个数组
array1 = ["label1.1", "label1.2", "label1.3", "label1.4"]
array2 = ["data1.1", "data1.2", "data1.3", "data1.4"]
array3 = ["label2.1", "label2.2", "label2.3", "label2.4"]
array4 = ["data2.1", "data2.2", "data2.3", "data2.4"]
我需要做的是得到哈希查找的结果数组
[ {key1=>"label1.1", value1=>"data1.1" },
{key1=>"label1.2", value1=>"data1.2" },
{key1=>"label1.3", value1=>"data1.3" },
{key1=>"label1.4", value1=>"data1.4" },
{key1=>"label2.1", value1=>"data2.1" },
{key1=>"label2.2", value1=>"data2.2" },
{key1=>"label2.3", value1=>"data2.3" },
{key1=>"label2.4", value1=>"data2.4" }
]
你的意见?