I'm trying to display a more complex json output into html and I haven't been able to figure out how the transform should be constructed using node-json2html
My json looks like this:
[
{
"name": "flight.LOL123 ",
"columns": [
"time",
"sequence_number",
"vert_rate",
"messages",
"squawk",
"altitude",
"lat",
"lon",
"validposition",
"track",
"validtrack",
"speed",
"seen",
"hex"
],
"points": [
[
1434558860921,
98792710001,
-512,
1018,
"4543",
3325,
15.74181,
71.60743,
1,
290,
1,
207,
0,
"4692d4"
],
[
1434558000838,
98401040001,
0,
4,
"0000",
25550,
0,
0,
0,
0,
0,
0,
0,
"4692d4"
]
]
}
]
I was able to get this:
var transform = {'tag':'li','html':'${name}, ${points}'};
but it will produce a first line containing the name and then the points are all on a single, long line.
Can anyone help me try to get the transformation right?