static final public Map<String,Object> asFlatMap(Map<? extends Object,? extends Object> nestedMap){
		Map flattenPropMap = new HashMap();

		List<Pair<String,Map<Object,Object>>> maps = new ArrayList<>();
		maps.add(new Pair("",nestedMap));

		while (maps != null) {
			List<Pair<String, Map<Object, Object>>> newMaps = new ArrayList<>();

			for (Pair<String, Map<Object, Object>> pathAndMap : maps) {
				String basePath = pathAndMap.getA();
				Map<Object, Object> m = pathAndMap.getB();

				// One level property/value
				for (Map.Entry entry : m.entrySet()) {

					Object keyObj = entry.getKey();
					String key = (keyObj instanceof String) ? (String) keyObj : keyObj.toString();
					Object value = entry.getValue();

					String propName = basePath + key;

					if (value instanceof Map) {
						newMaps.add(new Pair(propName + ".", (Map) value));
					} else {
						flattenPropMap.put(propName, value);
					}
				}
			}

			if (newMaps.size() > 0){
				maps = newMaps;
			}else{
				maps = null;
			}

		}


		return flattenPropMap;
	}