Json-to-HTML-Table icon indicating copy to clipboard operation
Json-to-HTML-Table copied to clipboard

Getting empty table in output for the simple JSON (DynamoDB query result)

Open git-hemant opened this issue 12 years ago • 2 comments

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.

git-hemant avatar Apr 01 '13 05:04 git-hemant

Try using complete method parameters like this:

var jsonHtmlTable = ConvertJsonToTable(objectArray, 'jsonTable', null, 'Download');

Let me know if this solution fixed your problem.

afshinm avatar Apr 06 '13 20:04 afshinm

The jsonData should be an Array, otherwise will give a empty table. But why jsonData need to be an Array? Weird.

jerry2605 avatar Mar 21 '19 15:03 jerry2605