怎样按照下面Map的key按照层级关系重新添加到map里面
Map<String, Object> map = new HashMap<String, Object>();
map.put("title", "title");
map.put("seo.title", "seoTitle");
map.put("seo.context", "seoContext");
map.put("xxx.ctgs", "xxxCtgs");
map.put("seo.innerLink.enable", false);
map.put("seo.innerLink.kwReplicationNum", 0);
map.put("seo.innerLink.ctgs", "seoInnerLinkCtgs");
希望规则按照转换成Map结构如下:
Map<String, Object> innerLink= new HashMap<String, Object>();
innerLink.put("ctgs":"seoInnerLinkCtgs");
innerLink.put("enable":false);
innerLink.put("kwReplicationNum":0);
Map<String, Object> seo= new HashMap<String, Object>();
seo.put("innerLink":innerLink);
seo.put("title":"seoTitle");
seo.put("context":"seoContext");
Map<String, Object> xxx= new HashMap<String, Object>();
xxx.put("title":"xxxTitle");
Map<String, Object> map = new HashMap<String, Object>();
map.put("title", title);
map.put("seo", seo);
map.put("xxx", xxx);