Json-to-HTML-Table
Json-to-HTML-Table copied to clipboard
Getting empty table in output for the simple JSON (DynamoDB query result)
I am trying JSON to html on the following JSON, and I am receiving empty table in the output. Any idea what I maybe missing here?
var jsonData = {"ConsumedCapacityUnits":0.5,"Item":{"FirstName":{"S":"Joe"},"LastName":{"S":"Smith"}}}; var htmlOutput = ConvertJsonToTable(jsonData); //Empty html table is returned here.
Try using complete method parameters like this:
var jsonHtmlTable = ConvertJsonToTable(objectArray, 'jsonTable', null, 'Download');
Let me know if this solution fixed your problem.
The jsonData should be an Array, otherwise will give a empty table. But why jsonData need to be an Array? Weird.