JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://helloworld.site44.com/css/bootstrap.css">
<link rel="stylesheet" href="http://helloworld.site44.com/css/bootstrap-responsive.css">
<link rel="stylesheet" href="http://helloworld.site44.com/css/style.css">
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://helloworld.site44.com/js/bootstrap.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<button type="button" class="btn btn-primary">List all sessions</button>
<div id="findsession-list-container">
<ul class="findsession-list"></ul>
</div>
JavaScript
var success = function(data) {
var sessionlist = "";
for(x in data.sessions){
sessionlist += '<li>' + data.sessions[x].ID;
if ('a' in data.sessions[x].Location) {
sessionlist += "<br>New York";
}
if ('b' in data.sessions[x].Location) {
sessionlist += "<br>Washington";
}
if ('c' in data.sessions[x].Location) {
sessionlist += "<br>California";
}
sessionlist += '</li>';
}
$(".findsession-list").html(sessionlist);
}
var json = '{"sessions":[ { "ID":"32113", "Location": { "a": [ { "id": 1, "name": "bat" }, { "id": 2, "name": "cat" } ], "b": [ { "id": 3, "name": "dat" }, { "id": 4, "name": "eat" } ] , "c": [ { "id": 5, "name": "fat" }, { "id": 6, "name": "gat" } ] } }, { "ID":"54564", "Location": { "a": [ { "id": 7, "name": "hat" }, { "id": 8, "name": "jat" } ], "b": [ { "id": 9, "name": "kat" }, { "id": 10, "name": "lat" } ] , "c": [ { "id": 11, "name": "mat" }, { "id": 12, "name": "nat" } ] } }, { "ID":"98754", "Location": { "a": [ { "id": 13, "name": "oat" }, { "id": 14, "name": "pat" } ], "b": [ { "id": 15,...