Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: lodash
node v6.17.1
version:
1.0.0
endpoint
share
tweet
var fp = require('lodash/fp'); var object = { 'a': [{ 'b': { 'c': 3 } }] }; var updated = fp.update('a[0].b.c', function(n) { return n * n; }, object) var updated2 = fp.set('a[0].b.c', 4, object) console.log(updated) console.log(updated2) console.log(object)
Created from: https://npm.runkit.com/lodash
Loading…
no comments
sign in
to comment