vue 获取json对象中的值
时间: 2023-09-07 10:15:17
浏览: 120
可以使用[vue](https://geek.csdn.net/educolumn/7b2ecef8415c958187948dbeb9e1b6da?spm=1055.2569.3001.10083)的数据绑定语法来获取JSON[对象]([http]([http](https://geek.csdn.net/educolumn/68f28ca3131d47699e5902c5d3d74d51?spm=1055.2569.3001.10083)s://geek.csdn.net/educolumn/68f28ca3131d47699e5902c5d3d74d51?spm=1055.2569.3001.10083)s://geek.csdn.net/educolumn/04c51611e4b730957464192e0307b82c?spm=1055.2569.3001.10083)中的值。例如,如果有一个JSON[对象](https://geek.csdn.net/educolumn/04c51611e4b730957464192e0307b82c?spm=1055.2569.3001.10083)如下:
```json
"name": "John",
"age": 30,
"address": {
"city": "New York",
"state": "NY"
```