alexpechkarev / google-maps

Collection of Google Maps API Web Services for Laravel
https://alexpechkarev.github.io/google-maps/
MIT License
523 stars 115 forks source link

Access the array in response #50

Closed einnar82 closed 6 years ago

einnar82 commented 6 years ago

How to access the array in ->get('routes'); in Directions API?

alexpechkarev commented 6 years ago

Hi @einnar82 ,

Use json_decode() to convert JSON string into PHP variable. See Processing Response for more details on parsing returning output.

Regards, Alexander