我有两张相同的桌子,att:class
没有其他att
的tr
or td
。
<table class='content'>
<caption>
<em> table1 </em>
</caption>
<tbody>
<tr>
<th> A </th>
<th> B </th>
<th> C </th>
</tr>
<tr>
<td> a1 <td>
<td> b1 <td>
<td> c1 <td>
</tr>
<tr>
<td> a2 <td>
<td> b2 <td>
<td> c2 <td>
</tr>
</tbody>
</table>
<table class='content'>
<caption>
<em> table2 </em>
</caption>
<tbody>
<tr>
<th> A </th>
<th> B </th>
<th> C </th>
</tr>
<tr>
<td> a3 <td>
<td> b3 <td>
<td> c3 <td>
</tr>
<tr>
<td> a4 <td>
<td> b4 <td>
<td> c4 <td>
</tr>
</tbody>
</table>
然后我想要一个像
{table1:[ {A:[a1,a2]}, {B:[b1,b2]}, {C:[c1,c2]} ], table2:[ {A:[a3,a4]}, {B:[b3,b4]}, {C:[c3,c4]} ], }
任何人都可以帮助我获得这个字典或类似的字典吗?