SOURCE

var obj = 
  {"logoUuid":null,"name":"JWT","field":"PRIVATE_CLOUD","deviceTypes":["WEB","MOBILE"],"loginUrl":"http://...","redirectUrl":"","spLoginType":"IDP","allowAppList":true,"allowUserAccessToken":true,"display":true,"idTokenExpiration":"600","accountLinkingTemplateUuid":"wefew32"}




document.write("<div style='color: black;'>");


for (let key in obj) {
  /* <Member name="uuid" tagName="Uuid" type="String"/> */
  let type = '识别不出来这是啥';
  let capitalKey = key.charAt(0).toUpperCase() + key.substring(1)

  console.log(typeof obj[key])

  if (typeof obj[key] == "boolean") {
    type = "Boolean";
  } else if (typeof obj[key] == "number") {
    type = "Integer";
  } else if (typeof obj[key] == "string") {
    type = "String";
  }

  // if (type == -1) {
  //   document.write(key + ": 识别不出来这是啥")
  // } else {
    document.write("&lt;Parameter name=\"" + key + "\" tagName=\"" + capitalKey + "\"  tagPosition=\"Query\" type=\"" + type + "\" required=\"false\"/>")
  // }

  document.write("<br>");

}

document.write("</div>");
console 命令行工具 X clear

                    
>
console