第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

需要幫助根據(jù)屬性將兩個數(shù)組與對象一起映射

需要幫助根據(jù)屬性將兩個數(shù)組與對象一起映射

慕尼黑8549860 2021-04-29 14:15:44
我試圖基于兩個不同的數(shù)組創(chuàng)建多個列表。我有一個名為categoryList和termsList的數(shù)組。我想將基于屬性的術(shù)語列表分組到categoryList數(shù)組。const categoriesList = [   { name: 'Categories', slug: 'category' },   { name: 'Tags', slug: 'post_tag' }];和const termsList = [   { id: 1, taxonomy: 'category', name: 'First category' },   { id: 2, taxonomy: 'category', name: 'Second category' },   { id: 3, taxonomy: 'post_tag', name: 'First tag' },   { id: 4, taxonomy: 'post_tag', name: 'Second tag' }];類別列表中的屬性段始終與termsList中的分類屬性具有相同的值。我想要完成的是在React組件中做到這一點(diǎn):<h1>Categories</h1><ul>   <li>First category</li>   <li>Second category</li></ul><h1>Tags</h1><ul>   <li>First tag</li>   <li>Second tag</li></ul>我不知道該怎么做。一些幫助將不勝感激。謝謝!
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 137 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號