JSFiddle - React, Tailwind, and code Playground

by Jonathan Smith

HTML

<div id="output">

</div>

JavaScript

const folderDetails = [];
    const folder = {};

    folder.name = 'folder1';
    folder.id = 'id1';
    folder.description = 'folder desc1';
    folder.path = 'path1';

    folderDetails.push(folder);

    folder.name = 'folder2';
    folder.id = 'id2';
    folder.description = 'folder desc2';
    folder.path = 'path2';

    folderDetails.push(folder);
document.getElementById('output').innerHTML = JSON.stringify(folderDetails);