My data is horizontal, but when it is transmitted to the background, it should be transmitted as vertical data. How to change the horizontal data to vertical data?

The

style is
clipboard.png


clipboard.png

{amount:"",assets:"",debt_ratio:"",type:"",type_value:""}


{amount:"",assets:"",debt_ratio:"",type:"",type_value:""}

clipboard.png

how can it be realized?

Mar.30,2021

of course you create a new array of 4-length objects, and then add attributes and attribute values to each array element


let newDataInfo_Bottom = []
let amount = {}
let assets = {}
dataInfo_Bottom.map((item,index) => {
    let obj = {}
    amount[index] = item.amount 
    assets[index] = item.assets
})
newDataInfo_Bottom.map((item,index)=>{
    item = {amount: amount[index],assets:assets[index]}
})
.
Menu