Two dimenstional array not working inside <script> tag

  • When passing the two-dimensional array is not working inside <script> tag and it is automatically converted to a string.

    Orginal Data from API : [[1656558660000,1082],[1656558720000,16000],[1656558780000,53311],[1656558840000,112095],[1656558900000,193935]]

    Actual Result getting when passing the data inside script tag: 1656558660000,1082,1656558720000,16000,1656558780000,53311,1656558840000,112095,1656558900000,193935

    Expected result : two-dimensional array as it is Orginal Data from API

  • There shouldn't be some flattening happening.
    Could you please provide a minimal playground replicating the problem?
    Thank you

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.