Filter json grep, map - Andrew Pougher

by Andrew Pougher

HTML

<h3> Filteres Results</h3>

<div id='flt'></div><div id='hotelphotos'></div>

CSS

h1 {
    color:blue
}
h3 {
    font-weight:bold
}

JavaScript

var keywords = [{
    field: "country",
    value: "China"
}, {
    field: "retailer",
    value: "Wal-Mart"
}]; //filter Json by these terms

var data = {
    "HotelRoomAvailabilityResponse": {
        "@size": "4",
        "customerSessionId": "0ABAA83E-8DEA-A9E9-13D2-1C8A60EC9283",
        "hotelId": 107494,
        "arrivalDate": "04\/28\/2013",
        "departureDate": "04\/30\/2013",
        "hotelName": "Best Western Plus Chicago Hillside",
        "hotelAddress": "4400 Frontage Road",
        "hotelCity": "Hillside",
        "hotelStateProvince": "IL",
        "hotelCountry": "US",
        "numberOfRoomsRequested": 1,
        "checkInInstructions": "<br \/><br \/> <p><strong>Notifications and Fees:<\/strong><br \/><\/p><p><\/p><p><\/p><p><\/p><p>The following fees and deposits are charged by the property at time of service, check-in, or check-out.  <ul><li>Pet fee: USD 50 per stay<\/li><li>Hot and cold buffet breakfast fee: USD 8.95 per person (approximately)<\/li><li>Rollaway bed fee: USD 10.00 per stay<\/li> <\/ul><\/p><p>The above list may not be comprehensive. Fees and deposits may not include tax and are subject to change. <\/p>",
        "tripAdvisorRating": 3.5,
        "tripAdvisorReviewCount": 65,
        "tripAdvisorRatingUrl": "http:\/\/www.tripadvisor.com\/img\/cdsi\/img2\/ratings\/traveler\/3.5-12345-4.gif",
        "HotelRoomResponse": [{
            "rateCode": 804459,
            "roomTypeCode": 162991,
            "roomTypeDescription": "Standard King - Non Refundable",
            "supplierType": "E",
            "propertyId": 16890,
            "rateOccupancyPerRoom": 2,
            "quotedOccupancy": 2,
            "minGuestAge": 0,
            "RateInfos": {
                "@size": "1",
                "RateInfo": {
                    "@rateChange": "false",
                    "@promo": "true",
                    "@priceBreakdown": "true",
                    "RoomGroup": {
                        "Room": {
                       ...