I am writing a test code to compare json value. Currently, it am using JSONAssert to compare my json value with api response and work fine.
But I think response json might be changed to support more feature. Then JSONAssert could report failed because there is extra field that isn't expected.
So I want to make a logic to remove some added elements before using JSONAssert.
Is there any simple way to remove desired fields from json ?
Example ) Current : { "field1": "AAAA", "field2": "BBBB" } Next : { "field1": "AAAA", "field3": "CCC" , "field2": "BBBB" }
I want to remove "field3" from json before using it.