Open unandyala opened 4 years ago
Haven't tried but you can do something like this using propertyFilter option.
const diffpatcher = create({ propertyFilter: (obj: any, name: string) => obj.name !== "A123", });
const diff = diffpatcher.diff(expectedJson, actualJson);
Hi Benjamine,
Thank you for the awesome library. I have a question related to arrays
I have array of objects. I want to exclude some of the objects based on the key - something like if key ends with number don't compare (exclude from diffing). Is that possible with plugins? If so where should it placed in the filters? sample json:
I want exclude object with key "A123" when doing diff
Thanks