PHP判断一个JSON对象是否含有某一个属性的方法

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

则rest的值为false

猜你喜欢

转载自www.cnblogs.com/firstcsharp/p/10776951.html