How to convert array of objects into array of arrays

后端 未结 3 1831
无人共我
无人共我 2020-12-12 07:58

The array of objects looks like this:

[
    {\"Number\":64,\"Earning\":160000},{\"Number\":64,\"Earning\":160000},
    {\"Number\":64,\"Earning\":160000},{\"         


        
3条回答
  •  眼角桃花
    2020-12-12 08:31

    Iterate over the array and construct a new array. Most javascript libraries have a map function where you only need to supply a mapping function to achieve this.

提交回复
热议问题