Closed logtomadhu closed 8 years ago
So your data is something like this?
head: ["Column 1", "Column 2"]
data: [["column 1 value", column 2 value"], ...]
You can pass the data array in as is, but for the head you'll need a new array with the array indexes converted to strings as keys, eg [{key: "0", label: "Column 1"}, {key: "1", label: "Column 2"}]
.
If you don't want to create it manually, try something like:
_.map(tableHeadArray, function (value, index) {
return {key: String(index), label: value};
});
Thanks a lot , Its working
Hi
Am new to meteor and javascript.
Am having two sets of array , 1.array which contains a table head 2.nested array contains table data.
how can i pass the key and label using this array
Suggest me how to solve this problem?