Open andreareina opened 2 years ago
Hello @andreareina. Thank you for using JSONDiff.
In this case you have two arrays that look like this:
Element | Left Side | Right Side |
---|---|---|
0 | 1 | 1 |
1 | 2 | 2 |
2 | 3 | 4 |
3 | 4 | missing |
In this case there are two differences between these two arrays. The first difference is that the second elements have different values: The left-side value is 3
and the right-side value is 4
. The second difference is that the right-side array is missing the third value.
This would be a little easier to see if the arrays had different values. Like this:
Left: ["apple", "banana", "orange", "pear"]
Right: ["apple", "banana", "pear"]
Element | Left Side | Right Side |
---|---|---|
0 | apple | apple |
1 | banana | banana |
2 | pear | orange |
3 | orange | missing |
In this case the two difference would be:
Both sides should be equal strings
and
Missing element
3
from the array on the right side
Does that help explain what's going on here and why you see two difference instead of one?
Left:
[1,2,3,4]
Right:[1,2,4]
Expected outcome:
2
from the array on the right sideActual outcome:
2
]3
from the array on the right side