This is a sample list of list.
[
[hour,name,year,age],
[12,'pravin',1997,23],
[12,'navin',1995,25],
[12,'prashant',1989,30]
]
How can i convert this to this below json using python. I basically want my first list element as key for other list elements. Basically this :
{
results:[{
hour : 12,
name : 'pravin',
year : 1995,
age : 30
},{
hour : 12,
name : 'navin',
year : 1995,
age : 25
},{
hour : 12,
name : 'prashant',
year : 1989,
age : 30
}
]
}