Need help with writing test cases for such data in body

Hi All,

I also need some help to create some test cases where my url is fetching data in such form:

“id”: “ABC”,
“name: :ABC”;
“ref”: 1
“id”: “SAM”,
“name”: “XYZ”,
“ref”: 1000
“type”: “Month”,
“amount”: 36
“category”: “Standard”,
“type”: “Postpaid”,
"price: [
“type”: “Month”,
“amount”: 1000,

there are various layers of data within elements.

any help is appreciated.


Maybe this is not the answer you want to hear, but in order to make such assertions you need to get familiar with nested objects and arrays in JavaScript.

Maybe this can be a starting point:

Once you have understood how that works and how you can access different properties, I am sure you will find creating assertions will be relatively easy.