getObjectDiff
Compares two objects and returns a diff for each value and its possible subvalues. Supports deeply nested objects of any value type.
IMPORT
FORMAT
Input
prevData
: the original object.nextData
: the new object.options
ignoreArrayOrder
: if set totrue
,["hello", "world"]
and["world", "hello"]
will be treated asequal
, because the two arrays contain the same values, just in a different order.showOnly
: returns only the values whose status you are interested in. It takes two parameters:statuses
: status you want to see in the output (e.g.["added", "equal"]
)granularity
:basic
returns only the main properties whose status matches your query.deep
can return main properties if some of their subproperties' status match your request. The subproperties are filtered accordingly.
Output
USAGE
Input
Output
Last updated