资源加载中... loading...

初入fmz,能麻烦大哥们帮忙取一下值吗?

Author: luqiang125, Created: 2021-02-18 22:29:22, Updated:

{“code”:0,“msg”:"",“detail_msg”:"",“data”:{“price”:“6.58”,“buy”:“0.097638908224630504”,“amount”:“0.5”,“fee”:“3”,“route”:""}} 取“price”:“6.58” 6.58这个数字


More

allez-z var price = Number(a.data.price) 再转换成数字

发明者量化-小小梦 ``` { "code": 0, "msg": "", "detail_msg": "", "data": { "price": "6.58", "buy": "0.097638908224630504", "amount": "0.5", "fee": "3", "route": "" } } ``` 假如上面这个变量是a 那么写: ``` var price = a.data.price ``` 即可。