Reputation:
I am working on a project running on node.js, but I have never worked with JSON before. I included an API, run a function and got a result returned. When I console.log the result I get this:
{ 'Sealed Graffiti | GLHF (Bazooka Pink)': {
opskins_price: 2,
market_price: 3,
opskins_lowest_price: 2
}
}
How do I work with that result? For example access the opskins_price
.
Upvotes: 1
Views: 74
Reputation: 11914
var obj = {
'Sealed Graffiti | GLHF (Bazooka Pink)': {
opskins_price: 2,
market_price: 3,
opskins_lowest_price: 2
}
}
console.log(obj['Sealed Graffiti | GLHF (Bazooka Pink)'].opskins_price) // output: 2
Upvotes: 1