Back to Immutable Js

removeIn()

website/docs/removeIn().mdx

5.1.5483 B
Original Source

import Repl from '@/repl/Repl.tsx'; import CodeLink from '@/mdx-components/CodeLink.tsx';

removeIn()

Returns a copy of the collection with the value at the key path removed.

A functional alternative to collection.removeIn(keypath) which will also work with plain Objects and Arrays.

<Signature code={removeIn(collection: C, keyPath: Iterable): C;} />

<Repl defaultValue={const original = { x: { y: { z: 123 }}} removeIn(original, ['x', 'y', 'z']) // { x: { y: {}}}} />