JSFiddle - React, Tailwind, and code Playground

by Aleksandr Pavlovsky

JavaScript 1.7

const changes = [['sell', 1237, 0000]]
const changes2 = [['buy', 2222, 1111]]
let result = []

fetchItem = arr => [
	{ 
  
  	'type': arr[0],
    'price': arr[1],
    'step': arr[2]
  }
]

result = [...result, ...fetchItem(changes[0])]
result = [...result, ...fetchItem(changes2[0])]

console.log('obj>> ', result)