Как наиболее оптимально заполнить таблицу данными из массива?
Всем привет. Уже несколько дней не могу найти решение вопроса. У меня есть массив объектов, как с помощью цикла или с помощью метода наиболее оптимально заполнить этими данными таблицу в Реакт? Вот сам массив:
[
{
"date": "2022-09-24",
"symbol": "AAPL",
"reportedCurrency": "USD",
"cik": "0000320193",
"fillingDate": "2022-10-28",
"acceptedDate": "2022-10-27 18:01:14",
"calendarYear": "2022",
"period": "FY",
"cashAndCashEquivalents": 23646000000,
"shortTermInvestments": 24658000000,
"cashAndShortTermInvestments": 48304000000,
"netReceivables": 60932000000,
"inventory": 4946000000,
"otherCurrentAssets": 21223000000,
"totalCurrentAssets": 135405000000,
"propertyPlantEquipmentNet": 42117000000,
"goodwill": 0,
"intangibleAssets": 0,
"goodwillAndIntangibleAssets": 0,
"longTermInvestments": 120805000000,
"taxAssets": 0,
"otherNonCurrentAssets": 54428000000,
"totalNonCurrentAssets": 217350000000,
"otherAssets": 0,
"totalAssets": 352755000000,
"accountPayables": 64115000000,
"shortTermDebt": 21110000000,
"taxPayables": 0,
"deferredRevenue": 7912000000,
"otherCurrentLiabilities": 60845000000,
"totalCurrentLiabilities": 153982000000,
"longTermDebt": 98959000000,
"deferredRevenueNonCurrent": 0,
"deferredTaxLiabilitiesNonCurrent": 0,
"otherNonCurrentLiabilities": 49142000000,
"totalNonCurrentLiabilities": 148101000000,
"otherLiabilities": 0,
"capitalLeaseObligations": 0,
"totalLiabilities": 302083000000,
"preferredStock": 0,
"commonStock": 64849000000,
"retainedEarnings": -3068000000,
"accumulatedOtherComprehensiveIncomeLoss": -11109000000,
"othertotalStockholdersEquity": 0,
"totalStockholdersEquity": 50672000000,
"totalEquity": 50672000000,
"totalLiabilitiesAndStockholdersEquity": 352755000000,
"minorityInterest": 0,
"totalLiabilitiesAndTotalEquity": 352755000000,
"totalInvestments": 145463000000,
"totalDebt": 120069000000,
"netDebt": 96423000000,
"link": "https://www.sec.gov/Archives/edgar/data/320193/000032019322000108/0000320193-22-000108-index.htm",
"finalLink": "https://www.sec.gov/Archives/edgar/data/320193/000032019322000108/aapl-20220924.htm"
},
{
"date": "2021-09-25",
"symbol": "AAPL",
"reportedCurrency": "USD",
"cik": "0000320193",
"fillingDate": "2021-10-29",
"acceptedDate": "2021-10-28 18:04:28",
"calendarYear": "2021",
"period": "FY",
"cashAndCashEquivalents": 34940000000,
"shortTermInvestments": 27699000000,
"cashAndShortTermInvestments": 62639000000,
"netReceivables": 51506000000,
"inventory": 6580000000,
"otherCurrentAssets": 14111000000,
"totalCurrentAssets": 134836000000,
"propertyPlantEquipmentNet": 39440000000,
"goodwill": 0,
"intangibleAssets": 0,
"goodwillAndIntangibleAssets": 0,
"longTermInvestments": 127877000000,
"taxAssets": 0,
"otherNonCurrentAssets": 48849000000,
"totalNonCurrentAssets": 216166000000,
"otherAssets": 0,
"totalAssets": 351002000000,
"accountPayables": 54763000000,
"shortTermDebt": 15613000000,
"taxPayables": 0,
"deferredRevenue": 7612000000,
"otherCurrentLiabilities": 47493000000,
"totalCurrentLiabilities": 125481000000,
"longTermDebt": 109106000000,
"deferredRevenueNonCurrent": 0,
"deferredTaxLiabilitiesNonCurrent": 0,
"otherNonCurrentLiabilities": 53325000000,
"totalNonCurrentLiabilities": 162431000000,
"otherLiabilities": 0,
"capitalLeaseObligations": 0,
"totalLiabilities": 287912000000,
"preferredStock": 0,
"commonStock": 57365000000,
"retainedEarnings": 5562000000,
"accumulatedOtherComprehensiveIncomeLoss": 163000000,
"othertotalStockholdersEquity": 0,
"totalStockholdersEquity": 63090000000,
"totalEquity": 63090000000,
"totalLiabilitiesAndStockholdersEquity": 351002000000,
"minorityInterest": 0,
"totalLiabilitiesAndTotalEquity": 351002000000,
"totalInvestments": 155576000000,
"totalDebt": 124719000000,
"netDebt": 89779000000,
"link": "https://www.sec.gov/Archives/edgar/data/320193/000032019321000105/0000320193-21-000105-index.htm",
"finalLink": "https://www.sec.gov/Archives/edgar/data/320193/000032019321000105/aapl-20210925.htm"
},
{
"date": "2020-09-26",
"symbol": "AAPL",
"reportedCurrency": "USD",
"cik": "0000320193",
"fillingDate": "2020-10-30",
"acceptedDate": "2020-10-29 18:06:25",
"calendarYear": "2020",
"period": "FY",
"cashAndCashEquivalents": 38016000000,
"shortTermInvestments": 52927000000,
"cashAndShortTermInvestments": 90943000000,
"netReceivables": 37445000000,
"inventory": 4061000000,
"otherCurrentAssets": 11264000000,
"totalCurrentAssets": 143713000000,
"propertyPlantEquipmentNet": 36766000000,
"goodwill": 0,
"intangibleAssets": 0,
"goodwillAndIntangibleAssets": 0,
"longTermInvestments": 100887000000,
"taxAssets": 0,
"otherNonCurrentAssets": 42522000000,
"totalNonCurrentAssets": 180175000000,
"otherAssets": 0,
"totalAssets": 323888000000,
"accountPayables": 42296000000,
"shortTermDebt": 13769000000,
"taxPayables": 0,
"deferredRevenue": 6643000000,
"otherCurrentLiabilities": 42684000000,
"totalCurrentLiabilities": 105392000000,
"longTermDebt": 98667000000,
"deferredRevenueNonCurrent": 0,
"deferredTaxLiabilitiesNonCurrent": 0,
"otherNonCurrentLiabilities": 54490000000,
"totalNonCurrentLiabilities": 153157000000,
"otherLiabilities": 0,
"capitalLeaseObligations": 0,
"totalLiabilities": 258549000000,
"preferredStock": 0,
"commonStock": 50779000000,
"retainedEarnings": 14966000000,
"accumulatedOtherComprehensiveIncomeLoss": -406000000,
"othertotalStockholdersEquity": 0,
"totalStockholdersEquity": 65339000000,
"totalEquity": 65339000000,
"totalLiabilitiesAndStockholdersEquity": 323888000000,
"minorityInterest": 0,
"totalLiabilitiesAndTotalEquity": 323888000000,
"totalInvestments": 153814000000,
"totalDebt": 112436000000,
"netDebt": 74420000000,
"link": "https://www.sec.gov/Archives/edgar/data/320193/000032019320000096/0000320193-20-000096-index.htm",
"finalLink": "https://www.sec.gov/Archives/edgar/data/320193/000032019320000096/aapl-20200926.htm"
},
{
"date": "2019-09-28",
"symbol": "AAPL",
"reportedCurrency": "USD",
"cik": "0000320193",
"fillingDate": "2019-10-31",
"acceptedDate": "2019-10-30 18:12:36",
"calendarYear": "2019",
"period": "FY",
"cashAndCashEquivalents": 48844000000,
"shortTermInvestments": 51713000000,
"cashAndShortTermInvestments": 100557000000,
"netReceivables": 45804000000,
"inventory": 4106000000,
"otherCurrentAssets": 12352000000,
"totalCurrentAssets": 162819000000,
"propertyPlantEquipmentNet": 37378000000,
"goodwill": 0,
"intangibleAssets": 0,
"goodwillAndIntangibleAssets": 0,
"longTermInvestments": 105341000000,
"taxAssets": 0,
"otherNonCurrentAssets": 32978000000,
"totalNonCurrentAssets": 175697000000,
"otherAssets": 0,
"totalAssets": 338516000000,
"accountPayables": 46236000000,
"shortTermDebt": 16240000000,
"taxPayables": 0,
"deferredRevenue": 5522000000,
"otherCurrentLiabilities": 37720000000,
"totalCurrentLiabilities": 105718000000,
"longTermDebt": 91807000000,
"deferredRevenueNonCurrent": 0,
"deferredTaxLiabilitiesNonCurrent": 0,
"otherNonCurrentLiabilities": 50503000000,
"totalNonCurrentLiabilities": 142310000000,
"otherLiabilities": 0,
"capitalLeaseObligations": 0,
"totalLiabilities": 248028000000,
"preferredStock": 0,
"commonStock": 45174000000,
"retainedEarnings": 45898000000,
"accumulatedOtherComprehensiveIncomeLoss": -584000000,
"othertotalStockholdersEquity": 0,
"totalStockholdersEquity": 90488000000,
"totalEquity": 90488000000,
"totalLiabilitiesAndStockholdersEquity": 338516000000,
"minorityInterest": 0,
"totalLiabilitiesAndTotalEquity": 338516000000,
"totalInvestments": 157054000000,
"totalDebt": 108047000000,
"netDebt": 59203000000,
"link": "https://www.sec.gov/Archives/edgar/data/320193/000032019319000119/0000320193-19-000119-index.html",
"finalLink": "https://www.sec.gov/Archives/edgar/data/320193/000032019319000119/a10-k20199282019.htm"
},
{
"date": "2018-09-29",
"symbol": "AAPL",
"reportedCurrency": "USD",
"cik": "0000320193",
"fillingDate": "2018-11-05",
"acceptedDate": "2018-11-05 08:01:40",
"calendarYear": "2018",
"period": "FY",
"cashAndCashEquivalents": 25913000000,
"shortTermInvestments": 40388000000,
"cashAndShortTermInvestments": 66301000000,
"netReceivables": 48995000000,
"inventory": 3956000000,
"otherCurrentAssets": 12087000000,
"totalCurrentAssets": 131339000000,
"propertyPlantEquipmentNet": 41304000000,
"goodwill": 0,
"intangibleAssets": 0,
"goodwillAndIntangibleAssets": 0,
"longTermInvestments": 170799000000,
"taxAssets": 0,
"otherNonCurrentAssets": 22283000000,
"totalNonCurrentAssets": 234386000000,
"otherAssets": 0,
"totalAssets": 365725000000,
"accountPayables": 55888000000,
"shortTermDebt": 20748000000,
"taxPayables": 0,
"deferredRevenue": 7543000000,
"otherCurrentLiabilities": 32687000000,
"totalCurrentLiabilities": 116866000000,
"longTermDebt": 93735000000,
"deferredRevenueNonCurrent": 2797000000,
"deferredTaxLiabilitiesNonCurrent": 426000000,
"otherNonCurrentLiabilities": 44754000000,
"totalNonCurrentLiabilities": 141712000000,
"otherLiabilities": 0,
"capitalLeaseObligations": 0,
"totalLiabilities": 258578000000,
"preferredStock": 0,
"commonStock": 40201000000,
"retainedEarnings": 70400000000,
"accumulatedOtherComprehensiveIncomeLoss": -3454000000,
"othertotalStockholdersEquity": 0,
"totalStockholdersEquity": 107147000000,
"totalEquity": 107147000000,
"totalLiabilitiesAndStockholdersEquity": 365725000000,
"minorityInterest": 0,
"totalLiabilitiesAndTotalEquity": 365725000000,
"totalInvestments": 211187000000,
"totalDebt": 114483000000,
"netDebt": 88570000000,
"link": "https://www.sec.gov/Archives/edgar/data/320193/000032019318000145/0000320193-18-000145-index.html",
"finalLink": "https://www.sec.gov/Archives/edgar/data/320193/000032019318000145/a10-k20189292018.htm"
}
]
Источник: Stack Overflow на русском