0
私はテーブルを作ることができるようにこのJSONを反復しようとしていますが、多くのヘッダとデータがあるので、どうやってこれをやりなおすことができますか?このJSONを反復でマップして反復する方法
const BBDDCustomer = {
ui_labels: {
name: 'Name',
address: 'address',
postalCode: 'Postal Code',
city: 'City',
country: 'Country',
telephone: 'Telephone',
email: 'Email',
modified: 'Modified',
delete: 'Delete'
},
data: [
{
name: 'n1',
address: 'a1',
postalCode: 'PC 1',
city: 'c 1',
country: 'cou 1',
telephone: 'tel 1',
email: 'em 1'
}
}
私はこのように記述する必要はありません。
<table striped bordered condensed hover responsive>
<thead>
<tr>
<th>{BBDDCustomer.ui_labels.name}</th>
<th>{BBDDCustomer.ui_labels.address}</th>
<th>{BBDDCustomer.ui_labels.postalCode}</th>
<th>{BBDDCustomer.ui_labels.city}</th>
<th>{BBDDCustomer.ui_labels.country}</th>
<th>{BBDDCustomer.ui_labels.telephone}</th>
<th>{BBDDCustomer.ui_labels.email}</th>
<th>{BBDDCustomer.ui_labels.modified}</th>
<th>{BBDDCustomer.ui_labels.delete}</th>
</tr>
</table>
を使いたいためにプロパティを列挙する必要がありますそれはない* JSON *> [何?](http://stackoverflow.com/questions/2904131/what-of-the-difference-json-and-object-literal-notation) –
'Map.php'を' map'と組み合わせて使うことができます。しかし、プロパティの順序は保証されていません。 –
答えはそれではないですか?構造体をマップしてレンダリングします。あなたはそれを行うために反応を学ぶ必要があります –