code: private Map<String, Object> convertToMap(Environment input) {
  		// First use the current convertToProperties to get a flat Map from the
  		// environment
  		Map<String, Object> properties = convertToProperties(input);
  
  		// The root map which holds all the first level properties
  		Map<String, Object> rootMap = new LinkedHashMap<>();
  		for (Map.Entry<String, Object> entry : properties.entrySet()) {
  			String key = entry.getKey();
  			Object value = entry.getValue();
  			PropertyNavigator nav = new PropertyNavigator(key);
  			nav.setMapValue(rootMap, value);
  		}
  		return rootMap;
  	}
docs: Method {@code convertToMap} converts an {@code Environment} to a nested Map which
  represents a yml/json structure.
  @param input the environment to be converted
  @return the nested map containing the environment's properties