JSFiddle - React, Tailwind, and code Playground
JavaScript
var isDefined = function(value, path) {
path.split('.').forEach(function(key) { value = value && value[key]; });
return (typeof value != 'undefined' && value !== null);
};
var t = {a: {a1: 33, a12: {aa1d: 444, cc: 3}}, b: 00};
var results = '';
['a.a12.cc', 'a.a1.cc'].forEach(function(path) {
results += 't[' + path + '] = ' + isDefined(t, path) + '\n';
});
document.body.appendChild(document.createElement('pre')).textContent = results;