Skip to content

Instantly share code, notes, and snippets.

@azimidev
Created November 17, 2020 15:16
Show Gist options
  • Save azimidev/5bb59aed8bdb4998e9009aba997bf63c to your computer and use it in GitHub Desktop.
Save azimidev/5bb59aed8bdb4998e9009aba997bf63c to your computer and use it in GitHub Desktop.
This lodash function will find the key value in any object and it will add/update [title] key/value
_.set(_.find(events, { id: 1 }), 'title', 'New title');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment