i have a table employee like this
name     value 
'e1'     'rahul'
'e2'     'priya'
'e3'     'abhijit'
and i need to extract json from the two columns such that the result is like this
{'e1':'rahul','e2':'priya','e3':'abhijit'}
I've tried the following query and the results is as follows
select row_to_json((name,value)) from employee 
O/P
{'f1':'e1','f2':'rahul'}
{'f2':'e1','f2':'priya'}
{'f3':'e1','f2':'abhijit'}
i don't want the f1 and f2 names over there,please advice!
 
     
     
    