I'm reading an xls file in java and I'm converting that xls file data into a Hashmap. I'm returning this hashmap to the feature file. But i'm getting output something like this.
{
"names": [
"{\"color\":\"blue\",\"name\":\"sushma\",\"id\":\"1\"}",
"{\"color\":\"orange\",\"name\":\"divya\",\"id\":\"2\"}",
"{\"color\":\"pink\",\"name\":\"lohi\",\"id\":\"3\"}"
]
}
where names is the sheet name and the remaining is data of the sheet.
* json results = doTesting.readExcel("C:\\Users\\sushma.i.dangeti\\eclipse-workspace\\xls\\ReadingxlsDemo.xls", "names")
Instead of using def, I have used json in the feature file but it is also not working. And also if I'm trying to access for instance, results.names[0].color then Its not printing anything. Can someone help me with this issue. Thanks in advance