Feature Request: Add an Option for Concatenating Arrays in ValuesStore.merge #4839
KLBeneteau
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
The
ValuesStore.merge
method currently useslodash.merge
to merge objects. While this works well for merging nested objects, it poses a challenge when dealing with arrays. Specifically,lodash.merge
merges arrays index by index, which is often not the desired behavior when working with session data.For example, merging the following objects:
result in :
This behavior makes it cumbersome to simply concatenate arrays, which is a common need in many use cases.
Beta Was this translation helpful? Give feedback.
All reactions