[Solved] PHP generate json – list of categories [closed]

You can use an multi-dimensional array with the json_encode function to achieve this structure. $var = array( “contacts” => array ( array( “id” => 1, “name” => “foo” ), array( “id” => 2, “name” => “bar” ) ) ); echo json_encode($var); 4 solved PHP generate json – list of categories [closed]

[Solved] how to create json string in swift and send it to server

let parameters: [String: AnyObject] = [ “Notification”: [ “id”: “15”, ………. …… ] ] Alamofire.request(.POST, “http://server.com”, parameters: parameters, encoding: .JSON) .responseJSON { request, response, JSON, error in print(response) print(JSON) print(error) } solved how to create json string in swift and send it to server

[Solved] PHP developers? rest response

Yes it is returning a json response. This is the exact reponse… {“type”:”FeatureCollection”,”features”:[{“type”:”Feature”,”properties”:{“zipCode”:”20002″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.0122299194336,38.89083480834961],[-77.00822448730469,38.89141082763672],[-77.00817108154297,38.89202880859375],[-77.00590515136719,38.89201354980469],[-77.00588989257812,38.89362335205078],[-77.00757598876953,38.89362716674805],[-77.0071792602539,38.8947868347168],[-77.00906372070312,38.89479064941406],[-77.00906372070312,38.90020751953125],[-77.01217651367188,38.90019989013672],[-77.01216125488281,38.90131759643555],[-77.00906372070312,38.90131378173828],[-77.00906372070312,38.90372848510742],[-77.0110092163086,38.903785705566406],[-77.01026916503906,38.9056510925293],[-77.01216125488281,38.90626907348633],[-77.00900268554688,38.90727233886719],[-77.00902557373047,38.91078186035156],[-77.00894165039062,38.92667770385742],[-77.00629425048828,38.92700958251953],[-77.00057220458984,38.92559051513672],[-77.00057220458984,38.92237091064453],[-76.99620056152344,38.922332763671875],[-76.99563598632812,38.92536163330078],[-76.99513244628906,38.923797607421875],[-77.0013427734375,38.910438537597656],[-76.99923706054688,38.91141128540039],[-76.9929428100586,38.91346740722656],[-76.99183654785156,38.91428756713867],[-76.98184967041016,38.91727828979492],[-76.97837829589844,38.91860580444336],[-76.9774398803711,38.91832733154297],[-76.95590209960938,38.917781829833984],[-76.94385528564453,38.9168701171875],[-76.94595336914062,38.915252685546875],[-76.95199584960938,38.9149055480957],[-76.95357513427734,38.91438293457031],[-76.95446014404297,38.91096115112305],[-76.95796966552734,38.90615463256836],[-76.95938873291016,38.90338897705078],[-76.96221923828125,38.899497985839844],[-76.96186065673828,38.895301818847656],[-76.96336364746094,38.88986587524414],[-76.97725677490234,38.88979721069336],[-76.97725677490234,38.89200210571289],[-76.98075866699219,38.89200973510742],[-76.98076629638672,38.889801025390625],[-76.98562622070312,38.889801025390625],[-76.98831176757812,38.89019012451172],[-76.98831939697266,38.889244079589844],[-76.99154663085938,38.889225006103516],[-76.99264526367188,38.88980484008789],[-77.00057983398438,38.889808654785156],[-77.00057983398438,38.89093780517578],[-77.00204467773438,38.89093780517578],[-77.00203704833984,38.889808654785156],[-77.0035171508789,38.889808654785156],[-77.00591278076172,38.88981246948242],[-77.00589752197266,38.887611389160156],[-77.00906372070312,38.88758850097656],[-77.01203155517578,38.8889274597168],[-77.0122299194336,38.89083480834961]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20005″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.03652954101562,38.907020568847656],[-77.03456115722656,38.9087028503418],[-77.03652954101562,38.908695220947266],[-77.03651428222656,38.91112518310547],[-77.02808380126953,38.91112518310547],[-77.02703857421875,38.9111213684082],[-77.02703857421875,38.89981460571289],[-77.028076171875,38.8983154296875],[-77.02703094482422,38.8983154296875],[-77.02703094482422,38.8973503112793],[-77.02961730957031,38.8973388671875],[-77.02961730957031,38.898311614990234],[-77.03195190429688,38.8983154296875],[-77.0319595336914,38.8973503112793],[-77.03364562988281,38.89734649658203],[-77.03511810302734,38.89876174926758],[-77.03459167480469,38.901336669921875],[-77.03654479980469,38.90252685546875],[-77.03652954101562,38.907020568847656]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20037″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.06937408447266,38.900367736816406],[-77.06275177001953,38.90203857421875],[-77.06279754638672,38.901065826416016],[-77.05743408203125,38.89966583251953],[-77.05753326416016,38.90028762817383],[-77.05859375,38.90133285522461],[-77.05360412597656,38.90849685668945],[-77.0501480102539,38.90963363647461],[-77.04879760742188,38.91041564941406],[-77.046630859375,38.91033935546875],[-77.04663848876953,38.90724563598633],[-77.0488052368164,38.9072380065918],[-77.04881286621094,38.905269622802734],[-77.04664611816406,38.90562438964844],[-77.04664611816406,38.903743743896484],[-77.04664611816406,38.90252685546875],[-77.04685974121094,38.9024772644043],[-77.048828125,38.902469635009766],[-77.048828125,38.9020881652832],[-77.0466537475586,38.90131759643555],[-77.0466537475586,38.900691986083984],[-77.04727172851562,38.90069580078125],[-77.04734802246094,38.89957809448242],[-77.0466537475586,38.89957809448242],[-77.04666137695312,38.89735412597656],[-77.04884338378906,38.897361755371094],[-77.04801940917969,38.89601516723633],[-77.05011749267578,38.89602279663086],[-77.05013275146484,38.893497467041016],[-77.04885864257812,38.89350128173828],[-77.0488510131836,38.8921012878418],[-77.0558853149414,38.892879486083984],[-77.05289459228516,38.89003372192383],[-77.05258178710938,38.88839340209961],[-77.0584945678711,38.88624572753906],[-77.06096649169922,38.88929748535156],[-77.06405639648438,38.890159606933594],[-77.06465911865234,38.891845703125],[-77.06729888916016,38.89921188354492],[-77.06819915771484,38.899810791015625],[-77.06937408447266,38.900367736816406]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20520″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.05011749267578,38.89602279663086],[-77.04801940917969,38.89601516723633],[-77.04668426513672,38.89531707763672],[-77.04667663574219,38.89350128173828],[-77.04885864257812,38.89350128173828],[-77.05013275146484,38.893497467041016],[-77.05011749267578,38.89602279663086]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20017″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.00868225097656,38.92823791503906],[-77.00697326660156,38.931209564208984],[-77.0060806274414,38.93427276611328],[-77.0080337524414,38.9423828125],[-77.00482940673828,38.94076156616211],[-77.00438690185547,38.94286346435547],[-77.00155639648438,38.94286346435547],[-77.00485229492188,38.94568634033203],[-77.0002670288086,38.94696044921875],[-77.00133514404297,38.949466705322266],[-77.00172424316406,38.95087814331055],[-76.99800872802734,38.95181655883789],[-76.99598693847656,38.951995849609375],[-76.99681854248047,38.952632904052734],[-76.99176788330078,38.953617095947266],[-76.99041748046875,38.95357131958008],[-76.98839569091797,38.95323944091797],[-76.98786926269531,38.9541015625],[-76.97843170166016,38.946807861328125],[-76.97782897949219,38.94633865356445],[-76.98037719726562,38.943214416503906],[-76.98020935058594,38.94071960449219],[-76.98199462890625,38.94071960449219],[-76.98043060302734,38.93923568725586],[-76.98408508300781,38.93927001953125],[-76.98287200927734,38.93492889404297],[-76.9823226928711,38.92802047729492],[-76.98403930664062,38.92793273925781],[-76.98388671875,38.92607116699219],[-76.98580169677734,38.925697326660156],[-76.98644256591797,38.92456817626953],[-76.98799896240234,38.923866271972656],[-76.98811340332031,38.92558288574219],[-76.9946517944336,38.92558288574219],[-76.99513244628906,38.923797607421875],[-76.99563598632812,38.92536163330078],[-76.99620056152344,38.922332763671875],[-77.00057220458984,38.92237091064453],[-77.00057220458984,38.92559051513672],[-77.00629425048828,38.92700958251953],[-77.00894165039062,38.92667770385742],[-77.00868225097656,38.92823791503906]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20535″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.0260009765625,38.89483642578125],[-77.02397155761719,38.89479446411133],[-77.02397155761719,38.89387512207031],[-77.0260009765625,38.89444351196289],[-77.0260009765625,38.89483642578125]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20565″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.02189636230469,38.8920783996582],[-77.01991271972656,38.89207458496094],[-77.0198974609375,38.892757415771484],[-77.01518249511719,38.891448974609375],[-77.01757049560547,38.890594482421875],[-77.01756286621094,38.888797760009766],[-77.02190399169922,38.888736724853516],[-77.02189636230469,38.8920783996582]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20551″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.04667663574219,38.89350128173828],[-77.044921875,38.89350891113281],[-77.04493713378906,38.8921012878418],[-77.04667663574219,38.8921012878418],[-77.04667663574219,38.89350128173828]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20018″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.0013427734375,38.910438537597656],[-76.99513244628906,38.923797607421875],[-76.9946517944336,38.92558288574219],[-76.98811340332031,38.92558288574219],[-76.98799896240234,38.923866271972656],[-76.98644256591797,38.92456817626953],[-76.98580169677734,38.925697326660156],[-76.98388671875,38.92607116699219],[-76.98403930664062,38.92793273925781],[-76.9823226928711,38.92802047729492],[-76.98287200927734,38.93492889404297],[-76.98408508300781,38.93927001953125],[-76.98043060302734,38.93923568725586],[-76.98199462890625,38.94071960449219],[-76.98020935058594,38.94071960449219],[-76.98037719726562,38.943214416503906],[-76.97782897949219,38.94633865356445],[-76.95874786376953,38.93159484863281],[-76.9419174194336,38.91858673095703],[-76.94293212890625,38.91740036010742],[-76.94385528564453,38.9168701171875],[-76.95590209960938,38.917781829833984],[-76.9774398803711,38.91832733154297],[-76.97837829589844,38.91860580444336],[-76.98184967041016,38.91727828979492],[-76.99183654785156,38.91428756713867],[-76.9929428100586,38.91346740722656],[-76.99923706054688,38.91141128540039],[-77.0013427734375,38.910438537597656]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20016″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.11975860595703,38.93434143066406],[-77.10449981689453,38.9464111328125],[-77.10070037841797,38.948909759521484],[-77.09149932861328,38.95650863647461],[-77.09099578857422,38.9568977355957],[-77.09073638916016,38.957096099853516],[-77.09014129638672,38.95644760131836],[-77.08617401123047,38.957054138183594],[-77.07410430908203,38.95658874511719],[-77.07152557373047,38.952171325683594],[-77.07249450683594,38.94869613647461],[-77.07242584228516,38.93815612792969],[-77.0705795288086,38.939090728759766],[-77.06829833984375,38.939083099365234],[-77.06639099121094,38.93815231323242],[-77.0663833618164,38.927528381347656],[-77.0773696899414,38.92752456665039],[-77.07896423339844,38.92628860473633],[-77.08094024658203,38.9282112121582],[-77.08151245117188,38.92615509033203],[-77.0826187133789,38.92786407470703],[-77.09355163574219,38.92756271362305],[-77.09452819824219,38.92578887939453],[-77.09650421142578,38.92582321166992],[-77.09876251220703,38.922332763671875],[-77.09857940673828,38.92115020751953],[-77.10195922851562,38.919952392578125],[-77.10191345214844,38.91861343383789],[-77.1050033569336,38.91633605957031],[-77.1063003540039,38.91910934448242],[-77.1134033203125,38.92521286010742],[-77.1166000366211,38.92890930175781],[-77.11681365966797,38.92949295043945],[-77.1178970336914,38.932411193847656],[-77.11975860595703,38.93434143066406]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20053″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.01299285888672,38.88667297363281],[-77.01078796386719,38.88507843017578],[-77.00906372070312,38.88506317138672],[-77.00910949707031,38.882080078125],[-77.0122299194336,38.882991790771484],[-77.01253509521484,38.884586334228516],[-77.01348114013672,38.886268615722656],[-77.01299285888672,38.88667297363281]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20009″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.05021667480469,38.921302795410156],[-77.0487289428711,38.922462463378906],[-77.04898834228516,38.92498016357422],[-77.04962921142578,38.928165435791016],[-77.04605865478516,38.92605209350586],[-77.04478454589844,38.927452087402344],[-77.04411315917969,38.92702102661133],[-77.04336547851562,38.92797088623047],[-77.0442123413086,38.929561614990234],[-77.04214477539062,38.92844772338867],[-77.02970886230469,38.92863464355469],[-77.02740478515625,38.928287506103516],[-77.02704620361328,38.92675018310547],[-77.02703857421875,38.91260528564453],[-77.02808380126953,38.91112518310547],[-77.03651428222656,38.91112518310547],[-77.046630859375,38.911128997802734],[-77.046630859375,38.9126091003418],[-77.04755401611328,38.9126091003418],[-77.04608917236328,38.914432525634766],[-77.04622650146484,38.91584014892578],[-77.04752349853516,38.918304443359375],[-77.04887390136719,38.91898727416992],[-77.05021667480469,38.921302795410156]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20230″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.03340911865234,38.8955078125],[-77.03195190429688,38.89550018310547],[-77.03196716308594,38.892093658447266],[-77.03365325927734,38.89208984375],[-77.03340911865234,38.8955078125]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20593″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.013671875,38.8646240234375],[-77.01089477539062,38.86468505859375],[-77.01012420654297,38.86728286743164],[-77.00907135009766,38.86728286743164],[-77.0090560913086,38.870079040527344],[-77.00916290283203,38.87069320678711],[-77.00888061523438,38.87080383300781],[-77.0082015991211,38.869911193847656],[-77.00741577148438,38.8695068359375],[-77.01060485839844,38.86489486694336],[-77.01176452636719,38.8636474609375],[-77.01367950439453,38.863525390625],[-77.013671875,38.8646240234375]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20032″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”MultiPolygon”,”coordinates”:[[[[-77.02786254882812,38.81615447998047],[-77.02696990966797,38.826324462890625],[-77.02620697021484,38.82991409301758],[-77.0246810913086,38.83310317993164],[-77.02356719970703,38.83430480957031],[-77.02427673339844,38.83534240722656],[-77.0230712890625,38.84040451049805],[-77.02127075195312,38.84602355957031],[-77.01911163330078,38.85017776489258],[-77.01897430419922,38.850433349609375],[-77.01667785644531,38.852989196777344],[-77.01526641845703,38.85590744018555],[-77.01318359375,38.85744857788086],[-77.01233673095703,38.85684585571289],[-77.01072692871094,38.8580436706543],[-77.0100326538086,38.855506896972656],[-77.01146697998047,38.85249328613281],[-77.0135726928711,38.85100555419922],[-77.0090103149414,38.84994125366211],[-77.00813293457031,38.84817123413086],[-77.00865936279297,38.850135803222656],[-77.0069580078125,38.85296630859375],[-77.0047378540039,38.85872268676758],[-77.00344848632812,38.860687255859375],[-77.0026626586914,38.860294342041016],[-77.00423431396484,38.85320281982422],[-77.00324249267578,38.85151672363281],[-76.99856567382812,38.852256774902344],[-76.9988021850586,38.85329818725586],[-76.99605560302734,38.85506820678711],[-76.99607849121094,38.8560676574707],[-76.98504638671875,38.84896469116211],[-76.98922729492188,38.844566345214844],[-76.98280334472656,38.84617614746094],[-76.98271942138672,38.84733963012695],[-76.98055267333984,38.84758758544922],[-76.98133087158203,38.84659957885742],[-76.9789047241211,38.84218978881836],[-76.9772720336914,38.841922760009766],[-76.97284698486328,38.8431510925293],[-76.97816467285156,38.83888244628906],[-76.97949981689453,38.83781051635742],[-76.9926986694336,38.82821273803711],[-77.0,38.82191467285156],[-77.00139617919922,38.82151412963867],[-77.02245330810547,38.80479431152344],[-77.02421569824219,38.80339050292969],[-77.02313995361328,38.80584716796875],[-77.02279663085938,38.80946350097656],[-77.0257797241211,38.81061935424805],[-77.02704620361328,38.81417465209961],[-77.02880859375,38.815330505371094],[-77.02786254882812,38.81615447998047]]],[[[-77.03097534179688,38.811195373535156],[-77.02915954589844,38.80901336669922],[-77.0297622680664,38.80851364135742],[-77.03077697753906,38.80854797363281],[-77.03128814697266,38.80836486816406],[-77.03097534179688,38.811195373535156]]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20006″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.04884338378906,38.897361755371094],[-77.04666137695312,38.89735412597656],[-77.0466537475586,38.89957809448242],[-77.0466537475586,38.900691986083984],[-77.0466537475586,38.90131759643555],[-77.04664611816406,38.90252685546875],[-77.04664611816406,38.903743743896484],[-77.0448989868164,38.90252685546875],[-77.04345703125,38.903743743896484],[-77.04168701171875,38.90252685546875],[-77.03654479980469,38.90252685546875],[-77.03459167480469,38.901336669921875],[-77.03511810302734,38.89876174926758],[-77.03510284423828,38.895816802978516],[-77.03795623779297,38.89539337158203],[-77.0379867553711,38.89863967895508],[-77.03925323486328,38.89874267578125],[-77.03946685791016,38.8953971862793],[-77.03948211669922,38.8921012878418],[-77.04173278808594,38.8921012878418],[-77.04347229003906,38.89351272583008],[-77.04668426513672,38.89531707763672],[-77.04801940917969,38.89601516723633],[-77.04884338378906,38.897361755371094]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20001″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.02808380126953,38.91112518310547],[-77.02703857421875,38.91260528564453],[-77.02704620361328,38.92675018310547],[-77.02740478515625,38.928287506103516],[-77.01956176757812,38.92927932739258],[-77.01798248291016,38.92844772338867],[-77.0167465209961,38.92753601074219],[-77.01403045654297,38.926273345947266],[-77.00894165039062,38.92667770385742],[-77.00902557373047,38.91078186035156],[-77.00900268554688,38.90727233886719],[-77.01216125488281,38.90626907348633],[-77.01026916503906,38.9056510925293],[-77.0110092163086,38.903785705566406],[-77.00906372070312,38.90372848510742],[-77.00906372070312,38.90131378173828],[-77.01216125488281,38.90131759643555],[-77.01217651367188,38.90019989013672],[-77.00906372070312,38.90020751953125],[-77.00906372070312,38.89479064941406],[-77.0071792602539,38.8947868347168],[-77.00757598876953,38.89362716674805],[-77.00817108154297,38.89202880859375],[-77.00822448730469,38.89141082763672],[-77.0122299194336,38.89083480834961],[-77.01518249511719,38.891448974609375],[-77.0198974609375,38.892757415771484],[-77.0198974609375,38.8973388671875],[-77.02191925048828,38.89727783203125],[-77.02191162109375,38.89844512939453],[-77.02703094482422,38.8983154296875],[-77.028076171875,38.8983154296875],[-77.02703857421875,38.89981460571289],[-77.02703857421875,38.9111213684082],[-77.02808380126953,38.91112518310547]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20036″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.0488052368164,38.9072380065918],[-77.04663848876953,38.90724563598633],[-77.046630859375,38.91033935546875],[-77.046630859375,38.911128997802734],[-77.03651428222656,38.91112518310547],[-77.03652954101562,38.908695220947266],[-77.03456115722656,38.9087028503418],[-77.03652954101562,38.907020568847656],[-77.03654479980469,38.90252685546875],[-77.04168701171875,38.90252685546875],[-77.04345703125,38.903743743896484],[-77.0448989868164,38.90252685546875],[-77.04664611816406,38.903743743896484],[-77.04664611816406,38.90562438964844],[-77.04881286621094,38.905269622802734],[-77.0488052368164,38.9072380065918]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20240″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.04347229003906,38.8953971862793],[-77.0417251586914,38.89540481567383],[-77.04174041748047,38.89352798461914],[-77.04347229003906,38.89351272583008],[-77.04347229003906,38.8953971862793]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20317″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.01903533935547,38.93739700317383],[-77.01741027832031,38.93788146972656],[-77.01092529296875,38.94461441040039],[-77.0080337524414,38.9423828125],[-77.0060806274414,38.93427276611328],[-77.00697326660156,38.931209564208984],[-77.01509857177734,38.93111038208008],[-77.01828002929688,38.93055725097656],[-77.01922607421875,38.93689727783203],[-77.01903533935547,38.93739700317383]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20510″,”city”:”Washington”,”county”:”District of columbia”,”state”:”DC”},”geometry”:{“type”:”Polygon”,”coordinates”:[[[-77.00757598876953,38.89362716674805],[-77.00588989257812,38.89362335205078],[-77.00590515136719,38.89201354980469],[-77.00817108154297,38.89202880859375],[-77.00757598876953,38.89362716674805]]]}},{“type”:”Feature”,”properties”:{“zipCode”:”20560″,”city”:”Washington”,”county”:”District … Read more

[Solved] extract json data in php and print it [closed]

This is the way to do it from PHP to javascript: var ar = JSON.parse( ‘<?php echo json_encode($array) ?>’ ); //ar[1][‘MemberData’]; //first memberdata value console.log(ar[1][‘MemberData’].value); and from javascript to php you need to use ajax jQuery.ajax({ type: “POST”, url: ‘xxxxxxx’, dataType: ‘json’, data: {array:array, //here you can pass the verified value of the array or … Read more

[Solved] parse JSON using json.net c# [closed]

Step 1. Make some models (or Plain Old C# Classes if you like) to deserialize your json into (generated by http://json2csharp.com/) – this is generally a little bit easier to work with that straight up json: public class Customise { public string name { get; set; } public int id { get; set; } public … Read more

[Solved] Insert new group into JSON using Javascript

You can just assign values, modules.groups[“<group key>”] = { “name”: “Tutorial 123”, “members”: [“97xx08xx01”, “97xx08xx05”, “97xx08xx03”] } PS: I think you are new to stackoverflow. Though I answered this question, this type of questions are not encouraged in this community. How to add attributes to a JSON is a very basic thing which is explained … Read more

[Solved] Extracting data from Json in Php

I hope you are looking for this, its very simple example by using json_decode(): $string = ‘{“seat_booked”:”A5″,”0″:”A5″,”1″:”A3″}’; $decoded = json_decode($string,true); $resuiredString = ‘”‘.”‘”.implode(“‘,'”, $decoded).”‘”.'”‘; echo $resuiredString; Result: “‘A5′,’A5’,’A3′” Side Note: I suggest you to learn about variable concatenation. PHP Concatenation 2 solved Extracting data from Json in Php

[Solved] How to add a value to a JSON array of objects?

First of all store the json array in a variable like var datalist=[{ _id: ’58a2b5941a9dfe3537aad540′, Country: ‘India’, State: ‘Andhra Pradesh’, District: ‘Guntur’, Division: ”, Village: ‘Macharla’, FarmerName: ‘Vijay’, Address: ”, Pin: ”, PrimaryContact: ‘9160062222’, OtherContacts: ”, Email: ”, updatedAt: ‘2017-02-14T04:39:01.000Z’, modifiedBy: ”, createdAt: ‘2017-02-14T04:39:01.000Z’ }, { _id: ’58a2b5941a9dfe3537aad541′, Country: ‘India’, State: ‘Telangana’, District: ‘Karimnagar’, Division: … Read more

[Solved] -[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance [duplicate]

NSArray *retrievedJTrans = [NSJSONSerialization JSONObjectWithData:response options:0 error:&jsonParsingError]; is a dictionary what you might want NSDictionary *retrievedJTransD = [NSJSONSerialization JSONObjectWithData:response options:0 error:&jsonParsingError]; NSArray *retrievedJTrans = retrievedJTransD[@”data”][@”translations”]; 0 solved -[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance [duplicate]

[Solved] How to list array names in json [closed]

You are misunderstanding usage of data types. Array is an anonymous type, you don’t name it’s elements. If you want to know name of an array, then you must change this structure to a dictionary (map). var arrayMapping = { ‘arr1’: […], ‘arr2’: […] }; But by doing so remember that every array will have … Read more

[Solved] how do json decode in php?

PHP’s JSON functions are documented here: http://us3.php.net/json The json_decode() function may be especially useful: http://us3.php.net/manual/en/function.json-decode.php solved how do json decode in php?