public List<Object> readField(Map<String,Object> source,String name){
  final List<String> keys=Arrays.asList(name.split("\\."));
  List<Object> values=new ArrayList<>();
  if (!keys.isEmpty()) {
    readField(source.get(keys.get(0)),keys.subList(1,keys.size()),values);
  }
  final List<Object> result;
  if (!values.isEmpty()) {
    result=values;
  }
 else {
    result=null;
  }
  return result;
}

public List < Object > readField ( Map < String , Object > source , String name ) { final List < String > keys = Arrays . asList ( name . split ( "\\." ) ) ; List < Object > values = new ArrayList < > ( ) ; if ( ! keys . isEmpty ( ) ) { readField ( source . get ( keys . get ( 0 ) ) , keys . subList ( 1 , keys . size ( ) ) , values ) ; } final List < Object > result ; if ( ! values . isEmpty ( ) ) { result = values ; } else { result = null ; } return result ; }
read field from document source .
