getListDiff
Compares two arrays and returns a diff for each entry. Supports duplicate values, primitive values and objects.
IMPORT
FORMAT
Input
prevList
: the original list.nextList
: the new list.options
showOnly
gives you the option to return only the values whose status you are interested in (e.g.["added", "equal"]
).referenceProperty
will consider an object to beupdated
rather thanadded
ordeleted
if one of its properties remains stable, such as itsid
. This option has no effect on other datatypes.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.considerMoveAsUpdate
: if set totrue
amoved
value will be considered asupdated
.
Output
USAGE
Input
Output
Last updated