Extraction in module 14 returns null | Rest Assured Training
10% June Month Discount Avail now

Rest Assured Training Forum

extraction in module 14 returns null

E
Enem Ndubuisi Post on 08/03/2019

Hi 

Trying to extract a value from a itemId key in a json file , the code seems all right but returns a null instead of the value of itemId key after running.

attached are my screen shots.

E
Enem Ndubuisi Reply on 08/03/2019

additional screen shots 

E
Enem Ndubuisi Reply on 08/03/2019

more screen shots

A

Instructor

Abhinav Reply on 08/03/2019

You can't extract Key "name" via this : path("name");

Correct path is : path("items{0}.name");

E
Enem Ndubuisi Reply on 08/03/2019

Thanks for quick response .

 

i have tried it but get this error.

E
Enem Ndubuisi Reply on 08/03/2019

Hi,

A clearer Screen shots

E
Enem Ndubuisi Reply on 10/03/2019

Hi sir,

still unresolved .

A

Instructor

Abhinav Reply on 29/03/2019

Sorry for the confusion earlier. 

Correct path is : path("items[1].name");