Displaying Bing JSON Results W/ Jquery RRS feed

  • Question

  • I have a code sample below that is unfinished.  I can get it to kick out the html blob, but I want to parse and display the JSON text as links and text.  Can someone point me to an example?

    thanks in Advance,


    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
    <script type="text/javascript">
        $(function() {
            var params = {
                // Request parameters
    "_type" : "SearchResponse",
    "WebPages" : "True",
                "q": "<cfoutput>#q#</cfoutput>",
                "count": "10",
                "offset": "0",
                "mkt": "en-us",
    "customconfig": "1xxxxxxxx8",
                "safesearch": "Moderate",
    "SearchResponse": "WebPages",

                url: "https://api.cognitive.microsoft.com/bingcustomsearch/v5.0/search?" + $.param(params),
                beforeSend: function(xhrObj){
                    // Request headers
                type: "GET",
    dataType: "json",
                // Request body

            .success(function(data) {

    alert("data has length");
    } else

    alert("data has no length"); }

            .fail(function() {

    <h2>Check out the following Results:</h2>
    <div id="results">Results Should be here!</div>

    <div style="width: 500px; margin:auto;">
    <h1>Bing Search</h1>
    <form method="post">
    <div align="center">
    <input type="text" name="q"><input type="submit" size="35"></form>


    • Edited by Rip Casdorph Wednesday, October 11, 2017 10:56 PM
    Wednesday, October 11, 2017 10:55 PM