0
里面我有一个存储过程返回单个阵列内的以下散列:通过哈希遍历数组
@cars = [{"make"=>"honda"}, {"color"=>"black"}, {"make"=>"acura"}, {"color"=>"red"}]
如何我将通过每一种迭代,这样我可以正确地把它们放进表。导致:
<table>
<tr>
<td>honda</td>
<td>black</td>
</tr>
<tr>
<td>acura</td>
<td>red</td>
</tr>
</table>
你的数据结构是离奇,不会'[{ “使”=> “HONDA” ,“color”=>“black”},{“make”=>“acura”,“color”=>“red”}]',其中数组的每个元素表示一个车/行,更有意义? –
数据结构是我必须使用的。所以我需要做这个工作。任何有用的建议? – oprogfrogo