JSFiddle - React, Tailwind, and code Playground

by grant

JavaScript

let obj = [{'marker': {'enabled': 1, 'fillColor': '#7cb5ec', 'lineColor': '#7cb5ec', 'radius': 0, 'states': {'normal': {'opacity': 1}}, 'symbol': 'circle'}, 'x': 1620518400000, 'y': 0}, {'marker': {'enabled': 1, 'fillColor': '#7cb5ec', 'lineColor': '#7cb5ec', 'radius': 0, 'states': {'normal': {'opacity': 1}}, 'symbol': 'circle'}, 'x': 1620518400000, 'y': 0}, {'marker': {'enabled': 1, 'fillColor': '#7cb5ec', 'lineColor': '#7cb5ec', 'radius': 0, 'states': {'normal': {'opacity': 1}}, 'symbol': 'circle'}, 'x': 1620518400000, 'y': 39.1}];


function foo(bar){
  console.log(typeof(bar));
}
foo(obj);

console.log(obj.length)
            
//obj.forEach((objs)=>console.log(objs.x,objs.y));

// for
for(var cfs of obj) {
   // console.log(call)
    console.log('cfs' + ': ' + cfs.y)
    }
    console.log("break")
var pg_url = obj[obj.length - 1]
 console.log(pg_url.y)
 
 var ready = ("'cfs': " + pg_url.y)
 console.log(ready)