Published
Edited
Apr 18, 2022
1 star
Also listed in…
Tips and Utilities
Insert cell
Insert cell
Insert cell
WWP = import('https://unpkg.com/wild-wild-path@2.4.0/build/src/main.js?module')
Insert cell
target = ({ settings: { colors: ['red', 'blue'] } })

Insert cell
color = WWP.get(target, 'settings.colors.0')
Insert cell
WWP.get(target, ['settings', 'colors', 0])
Insert cell
target2 = ({ settings: { lastName: undefined, colors: ['red', 'blue'] } })
Insert cell
WWP.has(target2, 'settings.firstName')
Insert cell
WWP.has(target2, 'settings.lastName')
Insert cell
target3 = ({
userOne: { firstName: 'John', lastName: 'Doe', age: 72 },
userTwo: { firstName: 'Alice', colors: ['red', 'blue', 'yellow'] },
})
Insert cell
WWP.list(target3, '**.firstName')
Insert cell
target4 = ({ colors: ['red', 'blue'] })
Insert cell
WWP.set(target4, 'colors.0', 'yellow')
Insert cell


Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more