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
tonic + npm: lodash
node v4.9.1
endpoint
share
tweet
const get = require("lodash").get; const a = { 'model.id': 1234, model: { id: 9876 } }; const b = { model: { id: 9876 }, 'model.id': 1234 }; console.log(get(a, 'model.id')); console.log(get(a, ['model', 'id'])); console.log(get(b, 'model.id'));
Created from: https://tonicdev.com/npm/lodash
Loading…
no comments
sign in
to comment