node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »

mozaik-ext-json2table

Mozaïk Json2Table widgets

A widget for the Mozaïk dashboard framework that converts a JSON into a html table.

Preview

value

Json2Table Widget Configuration

Api Configuration

No API configuration is needed.

Json Format

{
    "table":[
        {
            "Name": "Louise",
            "Age": "27",
            "Colour": "Red"
            
        },
        {
            "Name": "Margaret",
            "Age": "23",
            "Colour": "Blue"
            
        },
        {
            "Name": "Lisa",
            "Age": "34",
            "Colour": "Yellow"
            
        }
    ]
}

Running tests

To execute the tests, run the following command:

npm test

Working Dashboard Configuration Example

{
  type:               'json2table.table',
  title:              'Example:',
  url:                'https://dl.dropboxusercontent.com/s/mvvhaxwv832mihr/example.json?dl=0',
  columns: 1, rows: 4,
  x: 0, y: 0
}

Parameters

key required description
url yes The URL to fetch the json
title yes The widget title