ods icon indicating copy to clipboard operation
ods copied to clipboard

Adapter returns stringified array

Open MBuchalik opened this issue 3 years ago • 4 comments

When requesting data using the Adapter, we get a response like this:

{"id":1234,"data":"[{\"column1\":\"first\",\"column2\":\"second\",\"column3\":\"third\"}]"}

Expected result:

The "data" field should be an actual array.

{
  "id":1234,
  "data": [
    {"column1":"first","column2":"second","column3":"third"}
  ]
}

Actual result

The "data" field is currently a string. So you need to run JSON.parse() in order to get the actual data.

MBuchalik avatar Dec 15 '20 11:12 MBuchalik