JSFiddle - React, Tailwind, and code Playground

HTML

<h1 id="title">Foo's value will be displayed here ..</h1>

JavaScript

function Foo() {
    this.__value__ = {};
    this.__value__['20'] = 'some_value';
};

Foo.prototype.__defineGetter__('foo', function() {
	return this.__value__;
});

function Field() {
    this.__value__ = new Foo();
};

Field.prototype.__defineGetter__('value', function() {
	return this.__value__;
});

var field = new Field();
var value = field.value.foo['20'];
var elem = document.getElementById('title');
elem.innerHTML = value;