I'm implementing GCM using php server. I'm getting the response in JSON as shown:
{"multicast_id":5500424824887517718,"success":1,"failure":1,"canonical_ids":1,"results":[{"message_id":"0:1401303281549959%31e4cc17f9fd7ecd","registration_id":"APA91bGiXGz2KgfS1kELa7YM4VEEnnAk1H2_isOnWzJ0lNCJEmICQhjWaxQXJ0riZatG1LvZSRUYMNHF"},{"error":"NotRegistered"}]}
Now from the JSON, I have to check that is there any error in the response. I'm not getting how to check the same.
EDIT: I have understood how I can reach to the "error" field. But now the error is I'm not able to reach to "registration_id" field. I just have to check that does this "registration_id" field exist at any index of "results"?
Please help me regarding the same.
Thanks in advance.