Zoho Api Question

Zoho Api Question

Hey All,

Have a quick question regarding parsing json. I believe my code is valid however it doesn't display a response when i search for specific key / value. I can however return the response->uri just fine but can't get anything other than that or the full file.

  1. function GetLeads()
  2. {
  3. $file = fopen("https://crm.zoho.com/crm/private/json/Leads/searchRecords?authtoken=API KEY&scope=crmapi&criteria=(Last%20Name:test)", r) or exit("Unable to Open File!");
  4. while(!feof($file))
  5. {
  6. $theData = fgets($file);
  7. }
  8. fclose($file);
  9. $jsonObj = json_decode($theData);
  10. // print_r($jsonObj->response->result->Leads->row); // displays the results just fine.
  11. // echo $theData; // displays the result just fine.
  12. // echo $jsonObj->response->uri; // displays the URI
  13. echo $jsonObj->response->result->Leads->row->FL->Email; // doesn't display anything
  14. }
I've tried varius combinations of Leads->row->no->FL and even tried ->val  but nothing works. A little nudge in the right direction would be helpful and thank you.