eisenbraun / columns

A jQuery plugin that converts JSON data into searchable, sortable, HTML tables
http://eisenbraun.github.io/columns
MIT License
104 stars 47 forks source link

Can I use object array to render to html table? #30

Closed Arjuna-Bandara closed 5 years ago

Arjuna-Bandara commented 5 years ago

Hi, I am having a problem when using with a multidimensional array object. Is it possible to use this js library with Json object as below.

[ {"id":"31","Mesial":{"disorder":"","other":""},"Facial":{"disorder":"DC-HP","other":""},"Distal":{"disorder":"","other":""},"Lingual":{"disorder":"","other":""},"Occlusal":{"disorder":"","other":""}} ,{"id":"37","Mesial":{"disorder":"","other":""},"Facial":{"disorder":"RE-AR","other":""},"Distal":{"disorder":"","other":""},"Lingual":{"disorder":"","other":""},"Occlusal":{"disorder":"","other":""}} ]

eisenbraun commented 5 years ago

Columns only works with arrays of single-dimensional objects. Since your JSON data contains objects inside of objects it will not work.

Since this version of plugin is no longer maintained, my only recommendation is to alter or flatten data to meet the requirement.