While trying to dynamically render a table, it gets out of the document generated and looks as follows:
To avoid this, I followed the steps mentioned in:
- SO Post - 1, which uses
tabularx - SO Post - 2, which uses
adjustbox
But for both the approaches tried, I get an error saying:
Missing number, treated as zero
I tried reading about this error but could not understand, as it does not throw any error when doing without tabularx or adjustbox.
I am rendering my table using lualatex code as shown below:
tex.print("\string\\begin{tabularx}{" .. col_schema .. "}")
-- row / col rendering here
tex.print("\string\\end{tabularx}")
The document is generated from the JSON. I have shared JSON with the link for easier viewing : https://codebeautify.org/jsonviewer/cbe2bd65
What could I do to avoid this error?

\begin{tabular}{p{2cm}p{4cm}p{3cm}}for some suitable column widths, it is your document I can't pick suitable widths – David Carlisle May 08 '19 at 18:41