let icdIds = NSMutableString.init(string:"[")
for i in0...self.diagnoseArray.count-1 {
let icd=self.diagnoseArray[i]as? ICD10Dto
icdIds.appendFormat("'%@',",(icd?.id)!)
}
icdIds.deleteCharacters(in: NSMakeRange(icdIds.length-1,1))
icdIds.append("]")
/*
let param:Dictionary<NSString,NSString> = ["icd10Ids":icdIds,"advice":paramDict.object(forKey:"advice") as!NSString]
*/
原文链接:https://www.f2er.com/swift/322687.html