JSFiddle - React, Tailwind, and code Playground

JavaScript

var x = [6.7, 8, 7, 8.6];
for(var i in x) {
  x[i] = {}; 
  x[i]["y"] = x[i];
}

console.log(x);