Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excluded Paths Format For Arrays #57

Open
benwalpole opened this issue Sep 6, 2021 · 1 comment
Open

Excluded Paths Format For Arrays #57

benwalpole opened this issue Sep 6, 2021 · 1 comment

Comments

@benwalpole
Copy link

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.

@tomasbruckner
Copy link

items[0].secondKey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants