code: public static Map getOrCreateChildMap(Map parent, String key) {
          Object o = parent.get(key);
          if(o instanceof Map) {
              return (Map)o;
          }
          return new LinkedHashMap();
      }
docs: Gets a child map of the given parent map or returns an empty map if it doesn't exist
  
  @param parent The parent map
  @param key The key that holds the child map
  @return The child map