Hi,
I use PURE to build a complex table only from a JSON data object. I
use the 'pos' property to access data array keys and set these keys as
my column names (really useful !)
Now, i am trying to do dynamic filtering and sorting on this table.
For each column i have an input inside the <th> which allows to sort
and filter table rows (depending on data values)
But, i also have a special input on the left of the table which allows
to sort and filter table colums (depending on data keys)
My problem is that PURE doesn't allow to sort/filter objects (only
arrays). This prevents me to sort columns because their names depend
on data keys (not values).
sorry the example was not lisible so
Example again:
if my data is:
{
'users' : [
{ 'key1' : 'value11' , 'key2' : 'value12' },
{ 'key2' : 'value21' , 'key2' : 'value22' }
]
}
the table looks like:
[ col filter ] [ key1 ][ key2 ]
[ r1 filter ][ r2 filter ]
[ value11 ][ value12 ]
[ value21 ][ value22 ]