Skip to content

How to delete an element from an array with deepmerge. #243

Open
@ghost

Description

Hi, I would like to be able to remove a value from my array but with deepmerge the array values only add up. Does anyone have an idea how to solve this problem?

const dp = require('deepmerge');
const a = ['test0', 'test1', 'test2'];
const b = ['test1'];
dp(a, b); // outpout => ['test0', 'test1', 'test2', 'test1'] or I want ['test0', 'test2']

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions