wbish/jsondiffpatch.net

Excluded Paths Format For Arrays

benwalpole opened this issue · 1 comments

We are using the library in some integration tests for an API to validate that responses from the API match an expected response.

We want to ignore some of the fields in the API response but we aren't sure in what format we need to specify the excluded paths as the objects are within an array.

An example of the structure is shown below.
{ "items": [{ "firstKey": "firstValue", "secondKey": "secondValue". }] }

How would we specify "secondKey" to be excluded via ExcludedPaths? We have tried "secondKey", "items.secondKey", "items/secondKey" and "items.0.secondKey" but not seem to work.

items[0].secondKey