var obj = { a: \"A\", b: \"B\", c: \"C\" } console.log(obj.a); // return string : A
but i want to get by through a variable like this
obj["a"] is equivalent to obj.a so use obj[name] you get "A"
obj["a"]
obj.a
obj[name]