Reputation: 41
I want to get the value by the key of this json. The key is description and i want it in my console.log, i don't really get how to get this value, the filtering before worked fine.
{
"id": "149",
"description": "Try"
}
Thanks!
Upvotes: 1
Views: 14209
Reputation: 58533
const dummy = {
id : '1',
description : 'Wow awesome'
};
console.log(dummy.description);
//-------------------------------------
const descData = dummy.description;
console.log(descData);
variableName['description']
or variableName.description
Upvotes: 2