object(stdClass)#323 (3) { ["content"]=> string(157) "{"message":"Could not create contact.{"name":["The name field is required."],"mobile_number":["The mobile number field is required."]}","status":422}" ["status"]=> int(422) ["contentType"]=> string(16) "application/json" }
another response is
object(stdClass)#323 (3) { ["content"]=> string(333) "{"data":{"accounts_id":922,"virtual_account":"xxxxxxxx"},"status":200}" ["status"]=> int(200) ["contentType"]=> string(16) "application/json" }
How do i extract array attached with 'message' and data in php?