-
-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Description
When running deep-object-diff on an object which contains arrays those arrays are turned into objects.
Object on which deep-object-diff is used:
{
"Order": [{
"OrderLines": [{
"canEditQty": true,
"ProductId": "1234",
"ProductCode": "sku-1234",
"QtyAvailable": "5",
"QtyOrdered": "5",
"QtyInvoiced": "0",
"QtyShipped": "5",
"QtyInitialBo": "0",
"QtyBo": "0",
"Total": 6.8,
"Price": 1.36,
"PriceText": "$1.36",
"PriceMatchStatus": 0,
"OriginalPrice": 1.36,
"OriginalPriceText": "$1.36",
"IsPriceMatch": false
}]
}]
}
Those values are changed to :
QtyOrdered: "7"
Total: "9.52"
Price: "1.36"
Result of deep-object-diff:
{
"Order": {
"0": {
"OrderLines": {
"0": {
"QtyOrdered": "7",
"Total": "9.52",
"Price": "1.36"
}
}
}
}
}
This creates issues where we expect some data to be arrays and they are now objects.
williamboman, charlie-s, mdornseif and apefisk
Metadata
Metadata
Assignees
Labels
No labels