Search in JSON api url with ajax

<p>I have an api URL it's output JSON, it is about daily deals like groupon.</p><p>I want to create a search form and client search in this json</p><p>Samle json url <a href="http://bit.ly/1NPSTkd" rel="nofollow">here</a></p><p>I'm decode JSON like that and show it but how to search in this api url i don't know.</p><pre><br /><code>$param = array(<br /> 'apiKey' => 'VN43ZG2LLHKHHIU6',<br /> 'publisherId' => 316,<br /> //'isPopular' => 'on',<br /> 'p' => $sayfasi,<br /> 'itemInPage' => $sayi<br />);<br /><br />if(isset($tagid) && $tagid !='')<br /> $param['tagIds[]'] = $tagid;<br /><br />if(isset($cityId) && $cityId !='')<br /> $param['cityId'] = $cityId;<br /><br /><br /><br />$jsonurl = 'http://ift.tt/1YHObtK?'.http_build_query($param);<br /><br /><br />//$json = CurlConnect($jsonurl<br /><br />$json = file_get_contents($jsonurl);<br /><br />$json_output = json_decode($json);<br /></code><br /></pre><p>Search form should search in deals: title, description</p><p>Sample deals json block</p><pre><br /><code>"deals":[ <br /> { <br /> "id":"1041296",<br /> "title":"Tüm Cinemaximum'larda İndirimli Sinema Biletleri 9.50 TL'den Başlayan Fiyatlarla!",<br /> "description":"Cinemaximum İndirimli Bilet Fırsatı\r\nCinemaximum'larda indirimli bilet fırsatını kaçırmayın. ",<br /> "howToUse":null,<br /> "endDate":"2015-12-26 23:59:59",<br /> "discountPercent":"41",<br /> "country":"Turkey",<br /> "businessIds":"",<br /> "latLngs":"",<br /> "city":"",<br /> "provider":"Fırsat Bu Fırsat",<br /> "realPriceWithSymbol":"16 TL",<br /> "dealPriceWithSymbol":"9.50 TL",<br /> "showDealUrl":"http://ift.tt/1mFkFsR",<br /> "buyDealUrl":"http://ift.tt/1YHObtM",<br /> "image200_H":"http://ift.tt/1mFkDBa",<br /> "timeLeft":43377<br /> },...<br /></code><br /></pre><br /><h2>Click here view more answers <a href="%20http://stackoverflow.com/questions/34470311/search-in-json-api-url-with-ajax">http://ift.tt/1Oesz6K</a></h2>

Nhận xét

Bài đăng phổ biến từ blog này

Align div to bottom of the page in bootstrap

Align elements inside an tag vertically

Javascript is unable to stop page loading