问题描述
嗨,我正在尝试将所有内容都放在[]括号内。我已经尽我所能,但没有运气
this.gameInstance
.Quit()
.then(() => {
// Do whatever your app needs here
this.gameInstance = null;
this.playState$.next(null);
})
.catch(() => {
console.log("Quitting Unity wasn't a success ?");
});
编辑
我的代码
{
"Items": [
{
"UID": "XXX-XXX","Code": "USD","CurrencyName": "US Dollar","CurrencyRate": 0.71428000,"URI": "https://ar2.api.myob.com/accountright/XXX-XXX/GeneralLedger/Currency/XXX-XXX","RowVersion": "-6496407278109851648"
}
],"NextPageLink": null,"Count": 1
}
解决方法
您需要将JSON转换为数组,然后操纵该数组。假设文本在$json
中:
$array=json_decode($json,true);
$result=$array['Items'];
编辑
我忘记了json_decode
的第二个参数