Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Oct 18th, 2018
88
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.19 KB
| None
|
0
0
raw
download
clone
embed
print
report
const getProperty = (obj, string) => {
const array = string.split('.')
let a = obj
for(let i of array) {
a = a[i]
}
return a
}
console.log(getProperty(obj, 'a.b.c'))
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
C# | 7 min ago | 0.77 KB
Simple CLI C# File Manager
C# | 18 min ago | 9.73 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 💰
GetText | 21 min ago | 0.38 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 🤑
GetText | 23 min ago | 0.39 KB
Untitled
C# | 26 min ago | 0.83 KB
car price prediction
Python | 28 min ago | 3.31 KB
arrays comparison
Java | 50 min ago | 3.97 KB
openwrt router
JavaScript | 51 min ago | 2.17 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!