var obj={
"key1":"v1",
"key2":"v2"
}
If the value of key2 is taken, it is obj.key2
But if you want to retrieve it dynamically, such as var key="key2"
obj.key?
?
var obj={
"key1":"v1",
"key2":"v2"
}
If the value of key2 is taken, it is obj.key2
But if you want to retrieve it dynamically, such as var key="key2"
obj.key?
?
obj[key]. It is recommended to check out the basics