-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Arrays are returned as Objects, #79
Comments
Hi, I have a solution to this problem. Using I encountered this problem, which is to compare the old and new data of the server, return only the differences, and then merge them together on the front end. let oldData = null
const patch = diff(oldData, data)
// Convert an array-like object to an array, then store
// The lodash.merge method is used
oldData = cloneDeep(merger({}, patch))
// Send patch data to the front end
send(path) Hope it helps you. |
This doesn't work for me, |
I tried this library to do some diffs between two typescript objects and the problem that I faced in was that when the difference was returned all the arrays that i had in the object were converted to objects with keys the index of the element in the array
The text was updated successfully, but these errors were encountered: