Hello,
I received the json file below from a Google API call. This is my first time dealing with a JSON file. So if I needed to get the name, address, rating and price level from each when available, how would I do this? I looked at the docs for the JSON lib and still having trouble. Do I assign the text below to a variable and then decode it? Could someone show me some code on how to do this with the text below?
Thanks!!
{ "debug\_info" : [], "html\_attributions" : [], "next\_page\_token" : "CmRXAAAAt90EVao-f2Y6xfDi-FXkkZtKKLx-Lef6t0IPSrcssVmvkuoCIdxETCiCIvWHP0Ars6Q92K9NIeDIIKJMc1vgvVHdQZQfynfJz4ZkNtXgWn9hKz4PbJWhFlOWrSBX7GnnEhCCPaTOuKQww5CmVM7-pM6CGhSyY-yu-MHIRsx05PjHsCpp6ml1lg", "results" : [{ "geometry" : { "location" : { "lat" : 40.717923, "lng" : -74.00328500000001 } }, "icon" : "http://maps.gstatic.com/mapfiles/place\_api/icons/shopping-71.png", "id" : "9d48efdef3baaa003a959205563a4d07ca846b46", "name" : "Ricky's", "opening\_hours" : { "open\_now" : true }, "photos" : [ { "height" : 576, "html\_attributions" : [], "photo\_reference" : "CqQBnwAAADssUFDZ-7xWtRxZbx\_pa6CrY-Qgv1guMuZositS0k4KO7RZozTqoemNE0r2DSkuT9png4PpRMhJtWHP-fm-y\_1oVgBxt6daQX8oQU5gctvll1P8hnINaRX2d3aywMiSe9-lAcfmSQUofuobmIquWq3RJvFkehBn1Wq2T8HhCPpeWjofKzyyiqfQgdZhsfuM6ihZqGcOkWCVFgrEODnVJgISEK0yDtGjqaINiw-GggM-OpQaFCBBT7pwebJBmsF82WXRgj2d4oTs", "width" : 876 } ], "rating" : 3.2, "reference" : "CnRpAAAAfVwZ8-foC2u0JXoOVAgoxY0XGoTZ1NN0A1lDE0oDTO6FqhYMMkUqMmPb2lOUWqtss5T0rtdhVWteUJaqj4X5oAYx-GTUeUOGcEgRfQNdYPCloIsHwBop3rI0yKVuZkpBU8C4yOgjCTBGdFiMN3\_hvhIQU78OSZMnrVmSAOoZ4NJ-exoUYoQQ406rPHodf9mGARGJyghXNHw", "types" : ["clothing\_store", "store", "establishment"], "vicinity" : "375 Broadway, New York" }, { "geometry" : { "location" : { "lat" : 40.71797, "lng" : -74.005366 } }, "icon" : "http://maps.gstatic.com/mapfiles/place\_api/icons/shopping-71.png", "id" : "724e435b2ead533c239ed9317b8993e42a3f04bf", "name" : "O.K. Uniform Co., Inc.", "opening\_hours" : { "open\_now" : false }, "photos" : [{ "height" : 281, "html\_attributions" : [], "photo\_reference" : "CpQBgQAAACnIGi-EyGXX3iz4Ws4dLGqtkwpRjx2SZGjHroh\_IJAYFsMMc0sCkZ2mbwR406WQp8S-toV1u6narGxxY90DpUbIKnQ83QplKV8XnaWcRSPj6sN2R2EQ1W3-Tt7qDuL1-70s\_eYHQ49LxOmLnvHDe8dSHZerJPJOPviO30dRaAPBmQWpUf77r2Mpkh68tddznRIQQb993\_PvK37J8rxvYqbP3hoULBiBLPAFTuAtgObffHCk87gB\_iQ", "width" : 140 } ], "rating" : 3.7, "reference" : "CoQBeQAAAPq4UcGwKZPIO4myAsiCqSDZSmE\_UAi1DnIK8JgHS-FQrfJlCWYHofCU2Z07gq-lLXHPKOgjrROKfwIvg-JbxbuoJUNqqFPBxJB-e0Ur2RvNx6mPv8zENpLkP8aBarjrn7hU6M50ytAkEmFIukxPPJrEkYjFv\_OWWcyJt2Cg\_XafEhDOZAaDH1V1Yrx7pl4DJ\_1XGhQEgwS0VfPUP5Pzq8UnSPrHTOgp\_g", "types" : ["clothing\_store", "store", "establishment"], "vicinity" : "253 Church Street, New York" }, "status" : "OK" }