Showing results for 
Search instead for 
Did you mean: 

JSON Path Match Assertion - To compare the decimal values (.0)

Occasional Contributor

JSON Path Match Assertion - To compare the decimal values (.0)

Hi, I am using the JSON Path Match Assertion to match the response value with my excel (Data Driven). I am using data driven (Data Source excel) having all Inputs and Outputs (expected result). Now in API response i want o compare the Value with my Excel value.(Expected output) Problem is, say in response value is 1344.0 but in excel value is 1344 so it fails (snapshot attached). So please help how to handle it in assertion (Asset for content > JSON Path Expression) editor so that it compare the response value 1344.0 (or 134.00) with excel value 1344 and pass it
Community Leader

Hi @anagpal,



I think doing this in JSON path Match assertion is not possible, to achieve this you can write your own custom groovy code in script assertion. If you need help in that let me know.




Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓

Thanks and Regards,
Himanshu Tayal
New Here?
Join us and watch the welcome video:
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Get a full Raw JMS request


Compare an expected JSON value and actual response in Events


Fetch value/data from JSON response using Groovy Script

See replies!

Get data from Petstore and add it to Excel sheets

Top Kudoed Authors