Skip to content
/ t-gen Public

💥 A Simple library to dynamically create bootstrap tables from stringified JSON

Notifications You must be signed in to change notification settings

nym3r0s/t-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

T-Gen

Dynamically Create Bootstrap Tables from JSON String with fields corresponding to a map.

Requirements

  • Bootstrap 3
  • JQuery

Usage

  • Create a map between column names and the fields in the JSON String
var json_map = {
	"size" : "tshirt_size",
	"tgiven" : "tshirt_given",
	"fgiven" : "fcard_given",
	"egiven" : "extra_given"
}
  • Make sure that the JSON String is an array of JSON Objects.

  • Call the function with the parent JQuery object

tGen($("#parent1"),jsonString, json_map);
  • If you want the id of the row to be the value of a field from the JSONobj, Just pass the key as a paramter
tGen($("#parent1"),jsonString, json_map, idKey);
  • See example/seeder_script.js for usage and more details.

©️ 2015 Gokul Srinivas

About

💥 A Simple library to dynamically create bootstrap tables from stringified JSON

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published