LearnNewsExamplesServices
Frontmatter
id8550
titleEnhance Neo.mergeDeepArrays to support deep merging of objects within arrays
stateClosed
labels
enhancementaicore
assigneestobiu
createdAtJan 11, 2026, 5:19 PM
updatedAtJan 12, 2026, 3:42 AM
githubUrlhttps://github.com/neomjs/neo/issues/8550
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 12, 2026, 3:42 AM

Enhance Neo.mergeDeepArrays to support deep merging of objects within arrays

Closed v11.20.0 enhancementaicore
tobiu
tobiu commented on Jan 11, 2026, 5:19 PM

We are enhancing the Neo.mergeDeepArrays method to support a smarter merge strategy for arrays containing objects.

Current Behavior: The current implementation performs a set-based union for arrays, or simple replacement.

New Behavior: The enhanced implementation will iterate through the source array and the new array.

  1. It will attempt to match items based on an id or name property.
  2. If a match is found, it will recursively deep merge the objects using Neo.mergeDeepArrays.
  3. If no match is found by key, it will check for deep equality.
  4. New items are appended.
  5. Duplicates (by deep equality) are avoided.

This enhancement allows for extending configuration arrays (like fields_ in Data Models) where subclasses can override or extend specific items from the parent class without redefining the entire array.

Use Case: Allowing Portal.model.TicketTimelineSection to inherit fields from Portal.model.ContentSection and merge in new fields, while keeping the shared fields defined in the base class.

tobiu added the enhancement label on Jan 11, 2026, 5:19 PM
tobiu added the ai label on Jan 11, 2026, 5:19 PM
tobiu added the core label on Jan 11, 2026, 5:19 PM
tobiu referenced in commit ebde5e0 - "feat: Enhance mergeDeepArrays to support object merging in arrays (#8550) on Jan 11, 2026, 5:21 PM
tobiu assigned to @tobiu on Jan 12, 2026, 3:42 AM
tobiu closed this issue on Jan 12, 2026, 3:42 AM