For a get request im getting a and it contain some school .The schools should be appear by descending for the school rating number.

Somthing looks like this.

{
“location”: “Sydney”,
“minStudentAge”: 18,
“schoolType”: “Business”,
“rating”: 5,

  },
        {
     "location": "Sydney",
     "minStudentAge": 13,
     "schoolType": "Business",
     "rating": 5,

  },
        {
     "location": "Sydney",
     "minStudentAge": 16,
     "schoolType": "Business",
     "rating": 3,

  },
        {
     "location": "Sydney",
     "minStudentAge": 18,
     "schoolType": "Business",
     "rating": 1,

  },
        {
     "location": "Sydney",
     "minStudentAge": 16,
     "schoolType": "Business",
     "rating": 2,             }
      ]

So every node is having a value named “Rating” and i need to whether the return json contains data on correct order. Rating top (5) should be at the top of the list and rating low (1) should be at the bottom of the list.



Source link https://sqa.stackexchange.com/questions/35216/how-to--or-validate-the--order-of-a-response-json-data-on-

LEAVE A REPLY

Please enter your comment!
Please enter your name here