JSFiddle - React, Tailwind, and code Playground
HTML
<script>
// defines the "properties" getter
Object.defineProperty( Object.prototype, 'properties', {
get: function () {
var arr = [], that = this;
Object.keys( this ).forEach( function ( name ) {
arr.push( that[ name ] );
});
return arr;
}
});
</script>
JavaScript
var schema = {
"Files": {
"Lines": {
"198": {
"firstline": "sometext"
}
}
}
}
document.write( schema.Files.Lines.properties[0].firstline );