Data conversion for prime react data table component from array to JSON?

UI Components for React
Post Reply
Marie42
Posts: 1
Joined: 09 Nov 2020, 10:39

29 May 2021, 10:47

Whenever I call a java webservice (HTTP GET) fileLookup with an input parameter lookupId, it is returning me the response in an array as shown below.

[
"1224,First_File.docx,null,458,null,null",
"1225,Second File.js,test for description,15514,778,null",
"1226,Third_File.pdf,null,876,null,null"
]
The response values received corresponds to the following fields.

File id File Name Description user Id File Version
For example, in case of 1224,First_File.docx,null,458,null,null, 1224 is the File id, First_File.docx is File Name, null is Description, 458 is user Id and null is File Version respectively.

I want to display a primereact data table, which will display above things in the table. However, most of the examples I have found are using JSON data. For example, this sandbox example. In my case, since I don't have the data in the form of JSON object, should I consider converting the above data to JSON first so that I can supply that to Data table or anything else which can be done to achieve the same?
NomNom

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests