I have data in json format and I would like to pivot on the nym dimension. the json data are in the following format:
data=[{
l: 'es',
maxversion: '20210620',
nym: 'http://kaiko.getalp.org/dbnary#antonym',
count: '2827',
},
{
l: 'es',
maxversion: '20210620',
nym: 'http://kaiko.getalp.org/dbnary#approximateSynonym',
count: '0',
},
{
l: 'es',
maxversion: '20210620',
nym: 'http://kaiko.getalp.org/dbnary#holonym',
count: '0',
},
{
l: 'es',
maxversion: '20210620',
nym: 'http://kaiko.getalp.org/dbnary#hypernym',
count: '1589',
},
.
.
.
},]
I would like to have this format after pivot, to be able to use them in a graphic library:
[{
l: 'es',
maxversion: '20210620',
antonym:'2827' ,
approximateSynonym: '0',
holonym:'0',
hypernym:'1589',
hyponym:913,
meronym:'0',
synonym:'25821',
troponym: '0'
},
]