Department

A board-composition database for the web

The following code sample will generate a table of all board composition database entries.

$(function() { var db = document.querySelector(‘#board_composition’); $.getJSON(‘table’, function(data) { $.put(‘board_name’, db.board_info.board.name); $.selectAll(db.board_.name); }); })(); The above code snippet is fairly straightforward and easy to use.

However, if you need to modify it for your own use, you can create a custom object and then use it.

$(‘#boards’, function() { // create a new board database var db: JSONObject; $.each(db, function(board) { db.name = board.name; db.size = db.boards.size; }); }()); This code snippet shows how to access the table of board composition data.

$.table(‘boards’, [ { board_name: ‘Nuova’, size: 4, number: 4 }, { board: ‘Fractal’, number: 3, size: 5, number_of_boards: 4 } ])