2015-10-12 49 views
-2

我遇到了JSONObject.getJSONObject()的問題;功能。 我似乎無法從絃樂JSON對象中獲取數據。JSON android低級對象級retieval

JSONObject x = new JSONObject(); 
x.getJSONObject("name"); 

該對象具有一對夫婦levels.Example ... Object.response.Venue [0] .location.name的;

如何使用JSONObject獲取較低級別的對象?

{"meta":{"code":200,"requestId":"561bdb8c498e07f6cf28930f"},"response":{"venues":[{"id":"4c4dcde9ea24c9b6b9ccac14","name":"Pilsen","contact":{},"location":{"lat":41.857863272470325,"lng":-87.65763759613037,"cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["Chicago, IL","United States"]},"categories":[{"id":"4f2a25ac4b909258e854f55f","name":"Neighborhood","pluralName":"Neighborhoods","shortName":"Neighborhood","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/parks_outdoors\/neighborhood_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":11202,"usersCount":1582,"tipCount":12},"allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"555f7b95498e2f2bd6859b71","name":"Chicago Helicopter Experience","contact":{},"location":{"address":"2420 S Halsted St","lat":41.84844850964949,"lng":-87.64758018474052,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["2420 S Halsted St","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d1ed931735","name":"Airport","pluralName":"Airports","shortName":"Airport","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/travel\/airport_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":33,"usersCount":30,"tipCount":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4ba2a35bf964a520920b38e3","name":"CTA Bus 62","contact":{"phone":"8889687282","formattedPhone":"(888) 968-7282","twitter":"cta"},"location":{"crossStreet":"Archer","lat":41.846235508818104,"lng":-87.64837861061096,"postalCode":"60632","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["Archer","Chicago, IL 60632","United States"]},"categories":[{"id":"4bf58dd8d48988d12b951735","name":"Bus Line","pluralName":"Bus Lines","shortName":"Bus","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/travel\/busstation_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":537,"usersCount":119,"tipCount":2},"url":"http:\/\/www.transitchicago.com","specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4b7a0419f964a520371f2fe3","name":"CTA Bus 8","contact":{"phone":"8889687282","formattedPhone":"(888) 968-7282","twitter":"cta"},"location":{"crossStreet":"Halsted","lat":41.85369190555328,"lng":-87.64651179313658,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["Halsted","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d12b951735","name":"Bus Line","pluralName":"Bus Lines","shortName":"Bus","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/travel\/busstation_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":3749,"usersCount":795,"tipCount":11},"url":"http:\/\/www.transitchicago.com","specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4e9313198231bf0d17a65375","name":"HCSC OSC","contact":{},"location":{"address":"955 W Cermak Rd","lat":41.84980493421343,"lng":-87.6494446224005,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["955 W Cermak Rd","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d124941735","name":"Office","pluralName":"Offices","shortName":"Office","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/building\/default_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":22,"usersCount":8,"tipCount":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4c934f2ef600236ace2ec432","name":"Fiesta del Sol","contact":{"phone":"3126662663","formattedPhone":"(312) 666-2663"},"location":{"address":"1400 West Cermak Road","lat":41.852574954741534,"lng":-87.65637176204963,"cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["1400 West Cermak Road","Chicago, IL","United States"]},"categories":[{"id":"4eb1daf44b900d56c88a4600","name":"Fair","pluralName":"Fairs","shortName":"Fair","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/building\/fair_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":431,"usersCount":320,"tipCount":5},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"55356320498eb65835b26b0b","name":"South Side Smoke Shop Stop","contact":{},"location":{"lat":41.849632153161735,"lng":-87.65115737915039,"cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["Chicago, IL","United States"]},"categories":[{"id":"4bf58dd8d48988d1ff941735","name":"Miscellaneous Shop","pluralName":"Miscellaneous Shops","shortName":"Shop","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/shops\/default_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":1,"usersCount":1,"tipCount":0},"allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4c63184fec94a5938def2aca","name":"Collection Art Gallery","contact":{},"location":{"lat":41.853252938459875,"lng":-87.64676597488956,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d1e2931735","name":"Art Gallery","pluralName":"Art Galleries","shortName":"Art Gallery","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/arts_entertainment\/artgallery_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":13,"usersCount":8,"tipCount":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4d687e162acd6ea814402ec0","name":"CTA Bus Stop 15353","contact":{"phone":"8889687282","formattedPhone":"(888) 968-7282","twitter":"cta"},"location":{"address":"Halsted & Canalport","crossStreet":"Southbound","lat":41.85447505648477,"lng":-87.64667272567748,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["Halsted & Canalport (Southbound)","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d1fe931735","name":"Bus Station","pluralName":"Bus Stations","shortName":"Bus Station","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/travel\/busstation_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":18,"usersCount":9,"tipCount":0},"url":"http:\/\/www.transitchicago.com","specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"50eb1a98e4b0b7b97caa98a7","name":"Factor 75","contact":{"phone":"3126080810","formattedPhone":"(312) 608-0810","twitter":"factor75"},"location":{"address":"2121 S Racine Ave","lat":41.853324,"lng":-87.656185,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["2121 S Racine Ave","Chicago, IL 60608","United States"]},"categories":[{"id":"50aa9e744b90af0d42d5de0e","name":"Health Food Store","pluralName":"Health Food Stores","shortName":"Health Food Store","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/shops\/food_grocery_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":208,"usersCount":20,"tipCount":3},"url":"http:\/\/factor75.com","allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4d774dff7484b60ceb393ad9","name":"Union tattoo","contact":{},"location":{"address":"2600 S Halsted St","crossStreet":"26TH and Halsted","lat":41.84524476528168,"lng":-87.646331,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["2600 S Halsted St (26TH and Halsted)","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d1de931735","name":"Tattoo Parlor","pluralName":"Tattoo Parlors","shortName":"Tattoo","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/shops\/tattoos_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":75,"usersCount":48,"tipCount":3},"allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"55912a17498e06570924d6a7","name":"960","contact":{},"location":{"lat":41.855508,"lng":-87.650532,"cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["Chicago, IL","United States"]},"categories":[{"id":"4d954b06a243a5684965b473","name":"Residential Building (Apartment \/ Condo)","pluralName":"Residential Buildings (Apartments \/ Condos)","shortName":"Residential","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/building\/apartment_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":17,"usersCount":2,"tipCount":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4c4b34515609c9b605f4d090","name":"Rooms4Kids","contact":{"phone":"3122266666","formattedPhone":"(312) 226-6666","twitter":"rooms4kids1"},"location":{"address":"629 W Cermak Rd","lat":41.852607081543155,"lng":-87.64352344481487,"postalCode":"60616","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["629 W Cermak Rd","Chicago, IL 60616","United States"]},"categories":[{"id":"4bf58dd8d48988d1f8941735","name":"Furniture \/ Home Store","pluralName":"Furniture \/ Home Stores","shortName":"Furniture \/ Home","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/shops\/furniture_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":23,"usersCount":22,"tipCount":2},"url":"http:\/\/www.rooms4kids.com","allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4f65d34ce4b0777dfd9dba01","name":"The Powder Room","contact":{},"location":{"address":"2128 S Halsted St","crossStreet":"Cermak","lat":41.85323750421834,"lng":-87.64642390606265,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["2128 S Halsted St (Cermak)","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d110951735","name":"Salon \/ Barbershop","pluralName":"Salons \/ Barbershops","shortName":"Salon \/ Barbershop","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/shops\/salon_barber_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":51,"usersCount":8,"tipCount":0},"allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"50152bb4e4b0c3490eba4f64","name":"engine 8 truck 4 ambo 85 batt 2","contact":{},"location":{"lat":41.8497722033037,"lng":-87.64213096521769,"postalCode":"60616","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["Chicago, IL 60616","United States"]},"categories":[{"id":"4bf58dd8d48988d12c941735","name":"Fire Station","pluralName":"Fire Stations","shortName":"Fire Station","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/building\/government_firestation_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":5,"usersCount":3,"tipCount":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4f70997fe4b062083456d245","name":"Blue Ribbon Taxi 6569","contact":{},"location":{"lat":41.8442268371582,"lng":-87.65451049804688,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["Chicago, IL 60608","United States"]},"categories":[{"id":"4f2a23984b9023bd5841ed2c","name":"Moving Target","pluralName":"Moving Targets","shortName":"Moving Target","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/travel\/movingtarget_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":2,"usersCount":2,"tipCount":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"509469eae4b05f8bb543f42c","name":"Dassit","contact":{},"location":{"lat":41.855621,"lng":-87.650579,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d1d4941735","name":"Speakeasy","pluralName":"Speakeasies","shortName":"Speakeasy","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/nightlife\/secretbar_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":5,"usersCount":1,"tipCount":0},"allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4c12d1ce77cea5936fcbcd60","name":"Logsdon Gallery","contact":{},"location":{"address":"1909 S Halsted St","lat":41.854129553219735,"lng":-87.64657326037283,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["1909 S Halsted St","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d1e2931735","name":"Art Gallery","pluralName":"Art Galleries","shortName":"Art Gallery","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/arts_entertainment\/artgallery_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":11,"usersCount":11,"tipCount":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"5218d2d611d247f3bd0c6b31","name":"La Cascarita de ChiTown","contact":{},"location":{"address":"2255 S Throop St","lat":41.8497831154724,"lng":-87.65811060757305,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["2255 S Throop St","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d1c1941735","name":"Mexican Restaurant","pluralName":"Mexican Restaurants","shortName":"Mexican","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/food\/mexican_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":17,"usersCount":3,"tipCount":1},"allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4d6d3fcd4b86a090d7115d0a","name":"Knock Down Barns","contact":{"phone":"8479229953","formattedPhone":"(847) 922-9953","twitter":"knockdownbarns"},"location":{"address":"836 W Cullerton St","crossStreet":"Peoria","lat":41.855415755776214,"lng":-87.64754646036052,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["836 W Cullerton St (Peoria)","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d1e5931735","name":"Music Venue","pluralName":"Music Venues","shortName":"Music Venue","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/arts_entertainment\/musicvenue_","suffix":".png"},"primary":true}],"verified":true,"stats":{"checkinsCount":50,"usersCount":13,"tipCount":0},"url":"http:\/\/www.knockdownbarns.com","allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4b79d852f964a520cd152fe3","name":"F & R Liquor","contact":{"phone":"3124213031","formattedPhone":"(312) 421-3031"},"location":{"address":"2129 S Halsted St","crossStreet":"21st Pl.","lat":41.853345280561854,"lng":-87.64639018082819,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["2129 S Halsted St (21st Pl.)","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d123941735","name":"Wine Bar","pluralName":"Wine Bars","shortName":"Wine Bar","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/food\/winery_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":253,"usersCount":69,"tipCount":4},"url":"http:\/\/www.myspace.com\/fr_liquors","allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"534877a4498e8c4e36f2c6d1","name":"MAKE Chicago","contact":{"phone":"3129252627","formattedPhone":"(312) 925-2627"},"location":{"address":"1048 W 37th St","crossStreet":"Morgan","lat":41.852319747612505,"lng":-87.64630827658362,"postalCode":"60609","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["1048 W 37th St (Morgan)","Chicago, IL 60609","United States"]},"categories":[{"id":"4bf58dd8d48988d1f4941735","name":"Design Studio","pluralName":"Design Studios","shortName":"Design","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/shops\/design_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":15,"usersCount":7,"tipCount":1},"allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4dcc4df1d164ef21c4b8edfc","name":"Tony's Auto Collision Center, Inc.","contact":{"phone":"3122256500","formattedPhone":"(312) 225-6500"},"location":{"address":"2701 S Halsted St","lat":41.84413739249287,"lng":-87.64639499872037,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["2701 S Halsted St","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d124951735","name":"Automotive Shop","pluralName":"Automotive Shops","shortName":"Automotive","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/shops\/automotive_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":18,"usersCount":13,"tipCount":1},"allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"50539022e4b0244ddda482dd","name":"the bug stop","contact":{},"location":{"lat":41.85451533456595,"lng":-87.64645763127218,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d1ff941735","name":"Miscellaneous Shop","pluralName":"Miscellaneous Shops","shortName":"Shop","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/shops\/default_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":5,"usersCount":5,"tipCount":0},"allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4de1af74e4cd056f743311f0","name":"Hoguera De Pilsen","contact":{},"location":{"address":"2118 S Halsted St","crossStreet":"21st St","lat":41.85340057,"lng":-87.64683811,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["2118 S Halsted St (21st St)","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d1e4941735","name":"Campground","pluralName":"Campgrounds","shortName":"Campground","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/parks_outdoors\/campground_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":23,"usersCount":8,"tipCount":1},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"537a8acf498eb7fac064416b","name":"#thecuteness","contact":{},"location":{"address":"1927 S Peoria St","crossStreet":"Peoria & 19th","lat":41.8557759079824,"lng":-87.64811977143107,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["1927 S Peoria St (Peoria & 19th)","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d110951735","name":"Salon \/ Barbershop","pluralName":"Salons \/ Barbershops","shortName":"Salon \/ Barbershop","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/shops\/salon_barber_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":8,"usersCount":2,"tipCount":0},"allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"534da354498edb4991282608","name":"#44 Wallace Bus","contact":{},"location":{"lat":41.84778082393088,"lng":-87.64505078708335,"cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["Chicago, IL","United States"]},"categories":[{"id":"4f2a23984b9023bd5841ed2c","name":"Moving Target","pluralName":"Moving Targets","shortName":"Moving Target","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/travel\/movingtarget_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":1,"usersCount":1,"tipCount":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"4b96e752f964a520b3ec34e3","name":"David's Grill","contact":{"phone":"3126667727","formattedPhone":"(312) 666-7727"},"location":{"address":"800 W Cermak Rd","crossStreet":"at Halsted","lat":41.85275953752282,"lng":-87.64662143907832,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["800 W Cermak Rd (at Halsted)","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d1c1941735","name":"Mexican Restaurant","pluralName":"Mexican Restaurants","shortName":"Mexican","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/food\/mexican_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":246,"usersCount":94,"tipCount":6},"hasMenu":true,"menu":{"type":"Menu","label":"Menu","anchor":"View Menu","url":"https:\/\/foursquare.com\/v\/davids-grill\/4b96e752f964a520b3ec34e3\/menu","mobileUrl":"https:\/\/foursquare.com\/v\/4b96e752f964a520b3ec34e3\/device_menu"},"allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"52646448498edab2e608f9aa","name":"Elizabeth Smith Fashions","contact":{},"location":{"address":"2150 S Canalport Ave # 5-C","lat":41.853237,"lng":-87.650512,"postalCode":"60608","cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["2150 S Canalport Ave # 5-C","Chicago, IL 60608","United States"]},"categories":[{"id":"4bf58dd8d48988d104951735","name":"Boutique","pluralName":"Boutiques","shortName":"Boutique","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/shops\/apparel_boutique_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":1,"usersCount":1,"tipCount":0},"allowMenuUrlEdit":true,"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"},{"id":"55495f59498ee29add0cbc01","name":"fame studios","contact":{},"location":{"address":"2223 Throop","lat":41.851006,"lng":-87.657132,"cc":"US","city":"Chicago","state":"IL","country":"United States","formattedAddress":["2223 Throop","Chicago, IL","United States"]},"categories":[{"id":"52e81612bcbc57f1066b7a3d","name":"Advertising Agency","pluralName":"Advertising Agencies","shortName":"Advertising Agency","icon":{"prefix":"https:\/\/ss3.4sqi.net\/img\/categories_v2\/building\/default_","suffix":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":1,"usersCount":1,"tipCount":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"summary":"Nobody here","groups":[]},"referralId":"v-1444666252"}],"confident":false,"geocode":{"what":"","where":"chicago","feature":{"cc":"US","name":"Chicago","displayName":"Chicago, IL, United States","matchedName":"Chicago, IL, United States","highlightedName":"<b>Chicago<\/b>, IL, United States","woeType":7,"slug":"chicago-illinois","id":"geonameid:4887398","longId":"72057594042815334","geometry":{"center":{"lat":41.85003,"lng":-87.65005},"bounds":{"ne":{"lat":42.023134999999996,"lng":-87.52366099999999},"sw":{"lat":41.644286,"lng":-87.940101}}}},"parents":[]}}} 
+0

你必須張貼JSON爲我們能夠告訴如何解析它。 – RogueBaneling

+0

我不明白爲什麼我會被低估......尼爾明白了,並給出了一個很好的答案。 現在我不能發佈,所以我將不得不建立一個新的帳戶,並重新開始 – Testo

回答

0
x.getJSONObject("response") 
.getJSONArray("Venue") 
.getJSONObject(0) 
.getJSONObject("location") 
.getJSONObject("name");