Ask a Question

JSONpathcount for nodes with different name

SOLVED
Anna24
New Contributor

JSONpathcount for nodes with different name

I want to get the count of nodes in JSON response in script assertion. nodes have different names as 0,1,2.   Or else can i write a script assertion  for the occurrence of one field in JSON response.

 

I am currently using $[*].Number.

 

And it gives me path not found error

1 ACCEPTED SOLUTION

Accepted Solutions
Anna24
New Contributor

Re: JSONpathcount for nodes with different name

I had made a small typo error. It works thank you 🙂

 

Instead of $[*].Number.  i used $[*].number.

View solution in original post

2 REPLIES 2
nmrao
Community Hero

Re: JSONpathcount for nodes with different name

Please show the sample response that you are working with.


Regards,
Rao.
Anna24
New Contributor

Re: JSONpathcount for nodes with different name

I had made a small typo error. It works thank you 🙂

 

Instead of $[*].Number.  i used $[*].number.

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: