JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://cloud.github.com/downloads/SteveSanderson/knockout/knockout-2.1.0.js"></script>
<table width="100%" >
<tbody data-bind="foreach: invLines" style="width:100%">
<tr>
<td data-bind="text: line"></td>
<td>
<ul data-bind="foreach:links">
<li>
<a><span data-bind="text:linktxt"></span></a>
</li>
</ul>
</tbody>
</table>
JavaScript
var dataForVM = {
"invoiceSet": {
"lines": [
{
"line": "Business Partner had two or more interactions in the last 30 days",
"togState": "true",
"links": [
{
"linktxt": "Interaction History",
"linkid": "IRHIST"
}
]
},
{
"line": "Open CRC Complaints Exist",
"togState": "false",
"links": [
{
"linktxt": "Interaction History",
"linkid": "IRHIST"
}
]
},
{
"line": "Open Complaints Exist",
"togState": "true",
"links": [
{
"linktxt": "Interaction History",
"linkid": "IRHIST"
}
]
},
{
"line": "Business Partner is a landlord",
"togState": "false",
"links": []
},
{
"line": "Remotes Business Partner",
"togState": "true",
"links": [
{
"linktxt": "Interaction History",
"linkid": "IRHIST"
}
]
},
{
"line": "Recent move has occurred in the last 60 days",
"togState": "false",
"links": []
}
]
}
}
// var sets = jQuery.parseJSON( data);
var viewModel = {
invLines: ko.observableArray([]),
};
function() {
$.ajax({
type: "POST",
url: "https://dl.dropboxusercontent.com/u/150736671/sample2.json",
data: {
...