function readProperty(obj, propertySegments, index) {
  const value = obj[propertySegments[index]];
  return !!value && (index === propertySegments.length - 1 || readProperty(value, propertySegments, index + 1));
}
function readProperty(obj, propertySegments, index) {
  const value = obj[propertySegments[index]];
  return !!value && (index === propertySegments.length - 1 || readProperty(value, propertySegments, index + 1));
}
function readProperty ( obj , propertySegments , index ) { const value = obj [ propertySegments [ index ] ] ; return ! ! value && ( index === propertySegments . length - 1 || readProperty ( value , propertySegments , index + 1 ) ) ; }
Search deeply into an object via a collection of property segments, starting at the
indexed segment.

E.g. if `obj = { a: { b: { c: 10 }}}` then
`readProperty(obj, ['a', 'b', 'c'], 0)` will return true;
but
`readProperty(obj, ['a', 'd'], 0)` will return false;
Search deeply into an object via a collection of property segments starting at the indexed segment .
Returns true if the value at index is in obj