我有List<String> = ["name","class","age"];
我希望此列表转换为Map<String,String>;
喜欢Map<String,String>["name":"name","class":"class","age":"age"];
如何实现这一点?
我有List<String> = ["name","class","age"];
我希望此列表转换为Map<String,String>;
喜欢Map<String,String>["name":"name","class":"class","age":"age"];
如何实现这一点?
其中一种方法是:
我以前也遇到过这种情况。下面是我处理的方法。
输出:
{name: name, class: class, age: age}
快乐地飘舞!