static final public Map<String, Object> asNestedMap(Map<? extends Object, ? extends Object> flattenMap){
		Map<String, Object> nestedPropMap = new HashMap<>();

		Map<String, Map<String,Object>> mapByPath = new HashMap<>();

		for (Map.Entry entry : flattenMap.entrySet()){
			Object keyObj = entry.getKey();
			String key = (keyObj instanceof String)?(String)keyObj:keyObj.toString();

			Object val = entry.getValue();

			Object propVal = val;
			Map<String, Object> childPropMap = null;

			if (key.indexOf('.') != -1) {
				String[] names = key.split("\\.");
				int lastIdx = names.length - 1;
				for (int i = lastIdx; i >= 0; i--) {
					String propName = names[i];

					// the mapByPath key (TODO: need to optimize this)
					String mapByPathKey = String.join(".",Arrays.copyOfRange(names, 0, i));

					// if i == 0, then, we take the base propMap
					Map<String, Object> propMap = (i == 0)?nestedPropMap:mapByPath.get(mapByPathKey);

					boolean newPropMap = false;
					// create the propMap if needed
					if (propMap == null) {
						propMap = new HashMap<>();
						mapByPath.put(mapByPathKey, propMap);
						newPropMap = true;
					}

					// put the value
					propMap.put(propName, propVal);

					// determine if we need set childPropMap for next iteration
					if (newPropMap){
						propVal = propMap;
					}else{
						break;
					}
				}


			}else{
				nestedPropMap.put(key,val);
			}
		}

		return nestedPropMap;
	}