-1
I have the array as follows:
let arrTeste = [ [ '1', '10' ], [ '2', '30' ], [ '3', '40' ] ]
How would it be to take the data from the sub array and turns to something like:
let Obj={
{ item:'1', quantidade:'10'},
{ item:'2', quantidade:'30'},
{ item:'3', quantidade:'40'}
}
or
let obj=[
{ item:'1', quantidade:'10'},
{ item:'2', quantidade:'30'},
{ item:'3', quantidade:'40'}
]
What you tried so far and what errors your algorithm gave. Put a [MCVE] presenting your attempt to address the problem.
– Augusto Vasques
Dear good afternoon, thank you for trying to help, but that part was the only doubt I was having... what the colleague posted then clarified.
– Bruno Guedes
thank you Augusto.
– Bruno Guedes