JSFiddle - React, Tailwind, and code Playground

by dance2die

JavaScript 1.7

const data =  [{
 attributes: {
    name: "Text Widget Name",
    category: "PreBuild",
    description: "Text Widget Description",
    "chart-type": "text_widget"
 },
 type: "widget-templates"
}];
console.log(data[0]);

const textData = data;
const textWidgets = Object.keys(textData[0].attributes || [])    
    .map(key => console.log(`key = ${key}`));