Skip to Content
  • Website
Codsen
  • Home
  • Open Source
  • Articles
  • About

backOpen Source→object-merge-advanced→Examples

Table of Contents

  • Quick Take
  • Override a merge result in the callback
  • Deduplicate and sort merged string arrays
  • Clear an array merge when either array contains strings
  • Concatenate every clashing pair of arrays
  • Concatenate arrays on a selected key
  • Prefer incoming values for every clash
  • Take the incoming value for a selected clashing key
  • Keep existing values for every clash
  • Merge array values and omit duplicates instead of concatenating positions
  • Merge Boolean clashes with AND instead of the default OR
  • Merge positioned array objects even when their key sets differ
  • Let null explicitly override another value
  • Apply one array object to every object in the other array
↑ back to top

Quick Take

↑ back to top

Override a merge result in the callback

↑ back to top

Deduplicate and sort merged string arrays

↑ back to top

Clear an array merge when either array contains strings

↑ back to top

Concatenate every clashing pair of arrays

↑ back to top

Concatenate arrays on a selected key

↑ back to top

Prefer incoming values for every clash

↑ back to top

Take the incoming value for a selected clashing key

↑ back to top

Keep existing values for every clash

↑ back to top

Merge array values and omit duplicates instead of concatenating positions

↑ back to top

Merge Boolean clashes with AND instead of the default OR

↑ back to top

Merge positioned array objects even when their key sets differ

↑ back to top

Let null explicitly override another value

↑ back to top

Apply one array object to every object in the other array

↑ back to top
back 

Copyright

All rights reserved © Roy Revelt 2026
All our open source packages are under MIT licenceopens in a new tab

Activities

🐛 See a bug? Raise an issueopens in a new tab
💘 Check out the Indiewebopens in a new tab and Libera manifestoopens in a new tab