I have a collection in mongo that contains document with different set of fields in the documents. as explained below
{ "msc" : "UEMSC6",
"table" : "0",
"bnumber" : "0993514",
"F" : "31",
"L" : "11",
"M" : "1"
}
{
"msc" : "UEMSC6",
"table" : "0",
"bnumber" : "0993515"
}
{
"msc" : "UEMSC6",
"table" : "0",
"bnumber" : "09935150",
"F" : "31",
"L" : "11",
"M" : "1"
}
{
"msc" : "UEMSC6",
"table" : "0",
"bnumber" : "09935151",
"F" : "31",
"L" : "11",
"M" : "1"
}
{
"msc" : "UEMSC6",
"table" : "0",
"bnumber" : "09935152",
"RC" : "3",
"CC" : "2",
"L" : "10-11",
"M" : "1",
"BNT" : "4"
}
{
"msc" : "UEMSC6",
"table" : "0",
"bnumber" : "09935153",
"F" : "31",
"L" : "11",
"M" : "1"
}
From such a set of data I would like to show the results in a table, with the header dynamically constructed from the result obtained from the query.
There are possible 55 type of keys that can be contained in the result but mostly upto 10 are usually present.
So the header of the table should have only the keys that are present in the records
I am using yii framework, for my application implementation.
The only constraint is that the volume of records is more than 300K (at times). So performance is a major concern.
Appreciate any help in this.