我的以下代码
def traineeDetails = session.traineeDetailsForAuto
在印刷上给出:
traineeDetails = [name:[Hus, Vin], email:[hus@gmail.com, vin@gmail.com], phone:[9908877654, 9987655432], jobTitle:[SE, ST]]
def count = traineeDetails.name.size() gives correct value =2
但是当映射键包含一个值时
def traineeDetails = session.traineeDetailsForAuto
在印刷上给出:
traineeDetails = [name:Hus, email:hus@gmail.com, phone:9987766543, jobTitle:SE]
def count= traineeDetails.name.size() gives wrong answer 3 which is the total number of character in name
但在这里我需要获取键名持有的值的总数..
怎么做?