My controller is formatting my json incorrectly I believe

My controller is formatting my json incorrectly I believe

kevin223kevin223 Posts: 1Questions: 1Answers: 0
edited October 2021 in Free community support

Data looks like : {"data":[[{"Key":"M000_Variable_ID","Value":""},{"Key":"M001_Clients_ID","Value":""},{"Key":"M000_Name","Value":""},{"Key":"M000_Description","Value":""},{"Key":"M000_Text","Value":""},{"Key":"M000_Date","Value":""},{"Key":"M000_DateTime","Value":""},{"Key":"M000_Int","Value":""},{"Key":"M000_Decimal","Value":""},{"Key":"M000_BigInt","Value":""},{"Key":"M000_Show_On_Email","Value":""}],

How it should look
{"data":[{"M000_Variable_ID":"","M001_Clients_ID":"","M000_Name":"","M000_Description":"i","M000_Text":"","M000_Date":"","M000_DateTime":"","M000_Int":"","M000_Decimal":"","M000_BigInt":"","M000_Show_On_Email":""},

Is there a way to reformat it so it is proper for the datatable?

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Not sure why there is a double array for the data. Can you show me your controller code? I might not be able to solve it, but then again, I might be able to... :)

    Allan

Sign In or Register to comment.