Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I get phone number from this JSON response?
    primarykey
    data
    text
    <p>A little humour : Nerds always have problem getting phone number :(.</p> <p>I am trying to get phone number from this Google places api response, Developing application on iOS.</p> <pre><code>{ "html_attributions" : [], "result" : { "address_components" : [ { "long_name" : "48", "short_name" : "48", "types" : [ "street_number" ] }, { "long_name" : "Pirrama Road", "short_name" : "Pirrama Road", "types" : [ "route" ] }, { "long_name" : "Pyrmont", "short_name" : "Pyrmont", "types" : [ "locality", "political" ] }, { "long_name" : "NSW", "short_name" : "NSW", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "AU", "short_name" : "AU", "types" : [ "country", "political" ] }, { "long_name" : "2009", "short_name" : "2009", "types" : [ "postal_code" ] } ], "formatted_address" : "5/48 Pirrama Road, Pyrmont NSW, Australia", "formatted_phone_number" : "(02) 9374 4000", "geometry" : { "location" : { "lat" : -33.8669710, "lng" : 151.1958750 } }, "icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png", "id" : "4f89212bf76dde31f092cfc14d7506555d85b5c7", "international_phone_number" : "+61 2 9374 4000", "name" : "Google Sydney", "rating" : 4.60, "reference" : "CnRlAAAAAfV6JIqSzL8Cf4VnXn0EaI1d5k3IPhdkEonq0MxiUbQFFSVuptVbXbNH4mrevb0bc7G8yWqTUv76i4KTuO_Wf3OrRHjCJJwzQ0mNLjbYGSVqy2eqyrgOUkl6S_sJfTbHzWZYrfPy7KZaet0mM5S6thIQJYuy5v_JD--ZxXEJLWTQRRoU5UaciXBBo89K-bce18Ii9RsEIws", "types" : [ "store", "establishment" ], "url" : "http://maps.google.com/maps/place?cid=10281119596374313554", "vicinity" : "5/48 Pirrama Road, Pyrmont", "website" : "http://www.google.com.au/" }, "status" : "OK" } </code></pre> <p><strong>Target IS : "international_phone_number" : "+61 2 9374 4000"</strong></p> <hr /> <p>My so far effort,</p> <pre><code>NSDictionary *results = [responseString JSONValue]; placeInfo = [results objectForKey:@"result"]; //Getting result details but than I am stuck how to get to that international phone number? </code></pre> <p>Any input will be appreciated! Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload