/**
 *
 * @param select a string like 'some.thing'
 * @param obj an object containing data like {some:{ thing: mixed }}
 * @return {any}
 */
function selectByDoc(select, obj){

    return select.split('.').reduce((o, i) => o[i], obj);
}

export default selectByDoc;