Hi,
I have generated a json file (from csv) and want to compare it with the json response. The only difference between the json file and the json response is the order of the contents.How can I compare regardless of the order?
the json response I am getting ( jsonPath($…raw) )
[
{
“my_numeric”: “12.345”,
“my_date”: “2017-10-07”,
“my_time”: “12:02:03”,
“my_datetime”: “1066-10-0712:02:03”,
“my_character”: “Hello World”,
“my_logical”: “T”
},
.
.
.
and the json file myFile.json that I constructed from csv file is
[
{
“my_datetime”: “1066-10-0712:02:03”,
“my_numeric”: “12.345”,
“my_logical”: “T”,
“my_character”: “HelloWorld”,
“my_time”: “12:02:03”,
“my_date”: “2017-10-07”
},
.
.
.
.check(jsonPath("$..raw").find.is(ElFileBody("myFile.json")))
Thanks,