-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem handling arrays #16
Comments
as an example: "testarray" in key "a" in file 1 is (1,2,3,4) what "testarray" in the combined file should be is (0,1,2). |
This appears to be the default behavior of lodash's For now, I've added a |
first of all: thanks a lot for the super quick response! |
two more remarks:
|
ok...I did quickly test the array merging behavior for two arrays containing objects. It actually works properly! so my (1) in the last post only is a problem for arrays containing values. I am assuming that's because lodash just takes the numeric array index as the key which results in the observed behavior. bottom line: for arrays with keyed objects the old behavior is just fine. |
Glad it's working for you for now, and thanks for looking into the issues more closely! Your solution is along the lines of what I was thinking would be required, and I think it's probably the best and most flexible option. I'll leave this issue open to remind me and maybe invite some PRs. |
case:
combining two files (in the order file1, file2) which both contain a key "a" which contains an array in both files (the array in file2 is a subset of the one in file1)
results:
1.
with the concatArrays option set to true the result is as expected: the "a" keys are combined and the joint array consists of all the entries from both source arrays in the order file1, file2.
2.
with the concatArrays option set to false however the result is not as I would expect.
my expectation is to find just the array entries of file 2 (overwriting the array from file1).
instead the result seems to be a either just the array from file 1 or maybe a merge of the two, which in this scenario happens to be the array from file 1
The text was updated successfully, but these errors were encountered: