Flexmonster MCP Server is here! Connect your ✨AI assistant to our documentation. Get started
+

How to handle data with arrays

Answered
vasantjk vasantjk asked on February 8, 2022

Hi team how do we handle data which is in this format 
[{
ID:1,
activestatus:true,
name:["john","mayars"]
},
{
ID:2,
activestatus:false,
name:["john","cena"]
},
{
ID:1,
activestatus:true,
name:["john","wick"]
}
]
when the data is in this format the table is not showing the values in the table how to handle this kind of format

Maksym Diachenko created this ticket from #44150

2 answers

Public
Maksym Diachenko Maksym Diachenko ⋅ Flexmonster ⋅ February 9, 2022

Hello!

Thank you for your question.
Currently, the array data type is not supported by Flexmonster.
Here you can see supported JSON formats: https://www.flexmonster.com/doc/json-data-source/#supported-formats.
We recommend normalizing array data so that the "name" property contains a string value. 
Please check this example with data preprocessing on JSFiddle. 

Feel free to contact us if other questions arise.

Best Regards,
Maksym

Public
vasantjk vasantjk ⋅ February 10, 2022

Thanks.
For customizeCellFunction if i add button to the column how to i write functions to that button 
cell.style["text-align"] = "center";
        cell.style[
          "z-index"
        ] = 2;
        cell.text = `<button class="mybutton" onChange="myfunction()"></button>`;
if i write this in react it shows error how do achieve this functionality.

↪ Maksym Diachenko created a new ticket #44229 from this answer

Please sign in or register to submit your answer