Skip to content

Are there plans to support providing functions to compare only the fields that exist in both objects? #562

@anfreshman

Description

@anfreshman

Is your feature request related to a problem? Please describe.
I've used deepdiff to compare some JSON objects, but now I have a new scenario for a new project. I need to compare two special dicts.

Describe the solution you'd like
Generally speaking, the two dicts have the same structure, both converted from the JSON format response of the HTTP request, but one dict has more fields and the other has fewer, only containing key fields. I hope there is a function that can automatically ignore the fields that exist in dict A but not in dict B, and only compare the differences in the fields that exist in both objects.

I read the API documentation and found that currently it seems that only the ignored fields can be manually specified, which is almost unusable for this scenario because there will be a lot of different fields. So is there a plan to support a function that automatically ignores the non-existent fields between the two dicts and only compares the fields that exist?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions