how to get values of a spesifc key in js code example
Example: javascript object get value by key
var obj = {
a: "A",
b: "B",
c: "C"
}
console.log(obj.a); // return string : A
var name = "a";
console.log(obj[name]);
var obj = {
a: "A",
b: "B",
c: "C"
}
console.log(obj.a); // return string : A
var name = "a";
console.log(obj[name]);