I am very new to SOUPUI, I am able to read the response for restapi and able to save to file, I struked at this place i want to store a value from the response. Please help.
My questions :
- How can I store a random employeeId from the following response.(Pick any of the employeeId randomly)?
- How to get specific employeeId using employee name(Like i want to get "employeeId" if "firstName" name is "Daitha")?
- How can i read the employeeId using array (Like first , second ..employeeId)?
Following is the sample response:
{
"response": {
"stat": "SUCCESS",
"result": {
"employees": [{
"employeeId": "7d58129a-5ca3-4acd-a601-11478ba47988",
"firstName": "Daitha",
"lastName": "shankar",
"loginName": "xxxxx@xxx.com",
"mobileNumber": "xxxxxxxxxxxx",
"emailId": "xxxxxxx@xxxx.com",
"rowStatus": "A",
"assetCount": 3087,
"canUseapp": "Y",
"supportUserInd": "N"
}, {
"employeeId": "e2dec6de-8882-4c5b-a875-41fffe8e977f",
"firstName": "john",
"lastName": "deo",
"loginName": "xxxx@yyy.com",
"emailId": "xxxx@xxx.com",
"rowStatus": "A",
"assetCount": 0,
"canUseapp": "Y",
"supportUserInd": "N"
}, {
"employeeId": "9a9e7ff6-edb7-402a-bed2-27e9036a716f",
"tenantBadgeId": "EMP11659824",
"firstName": "suman",
"lastName": "m",
"loginName": "eeee@sfsdf.om",
"mobileNumber": "xxxxxx",
"emailId": "xxxxxx@xxxxxx.com",
"rowStatus": "A",
"designation": "software QA engineer",
"assetCount": 0,
"canUseapp": "Y",
"supportUserInd": "N"
}, {
"employeeId": "9ecf7fc8-c06d-4e3c-a3a3-d2c50509c16b",
"firstName": "vinay",
"lastName": "B",
"loginName": "xxxxxx@.dsfsd.com",
"emailId": "xxxxx.@xxxx.com",
"rowStatus": "A",
"assetCount": 0,
"canUseapp": "Y",
"supportUserInd": "N"
}]
}
}
}
Thanks in Advance