PHP判斷一個JSON對象是否含有某一個屬性的方法

property_exists
好比:var json={"code":400,"msg":"User Err"}
var rest=property_exists(json, 'access_token')

則rest的值爲falsejson

相關文章
相關標籤/搜索