Из сценария карате я вызываю метод базы данных, чтобы получить записи как
Код: Выделить всё
* def records = Db.getData(uName,pwd,host,dbClass,"SELECT * FROM employee")
Код: Выделить всё
records
Код: Выделить всё
{
"0": {
"name": "John M",
"designation": "CEO",
"dob": "2024-08-27",
"joiningDate": "2024-08-27"
},
"1": {
"name": "William C",
"designation": "CFO",
"dob": "2024-08-27",
"joiningDate": "2024-08-27"
}
}
Код: Выделить всё
* print records[0].name
* print records{0}.name
* print records['0'].name
* print records["0"].name
P.S. Класс, возвращающий результат с возвращаемым типом данных
Код: Выделить всё
HashMap
Спасибо!
Подробнее здесь: https://stackoverflow.com/questions/790 ... -framework