I have a JSON data like this. "suite":[{"hostname":"localhost","failures":0,"package":"ABC","tests":0,"name":"ABC_test","id":0,"time":0,"errors":0,"testcase":[{"classname":"xyz","name":"foo1","ti...
See more...
I have a JSON data like this. "suite":[{"hostname":"localhost","failures":0,"package":"ABC","tests":0,"name":"ABC_test","id":0,"time":0,"errors":0,"testcase":[{"classname":"xyz","name":"foo1","time":0,"status":"Passed"},{"classname":"pqr","name":"foo2)","time":0,"status":"Passed"},.... I want to create a table with Suite testcase_name and Testcase_status as columns. I have a solution using mvexpand command. But when there is large data output gets truncated using mvexpand command. ....| spath output=suite path=suite{}.name | spath output=Testcase path=suite{}.testcase{}.name| spath output=Error path=suite{}.testcase{}.error | spath output=Status path=suite{}.testcase{}.status|search (suite="*")
| eval x=mvzip(Testcase,Status)
| mvexpand x|eval y=split(x,",")|eval Testcase=mvindex(y,0)
| search Testcase IN ("***")
| eval suite=mvdedup(suite)
|eval Status=mvindex(y,1) |table "Suite" "TestCase" Status This is the query im using. But the results gets truncated. Is there any alternative for mvexpand so that i can edit the above query ?