I have a pandas Series that I have converted into JSON for Angular to display in a table. The issue is that the key values are a python list under a string type. How can I convert the key into an array for Angular?
JSON:
{
"result": {
"('', '100.83.105.90')": 1,
"('AS1124 Universiteit van Amsterdam', '145.18.162.122')": 2,
"('AS11796 Airstream Communications, LLC', '64.33.197.15')": 1,
"('AS16276 OVH SAS', '51.75.201.126')": 1,
"('AS209 CenturyLink Communications, LLC', '174.27.155.12')": 1,
"('AS22394 Cellco Partnership DBA Verizon Wireless', '174.241.2.88')": 1,
"('AS24608 Wind Tre S.p.A.', '37.227.23.201')": 1,
"('AS3329 Vodafone-panafon Hellenic Telecommunications Company SA', '5.55.162.202')": 1,
"('AS3352 Telefonica De Espana', '80.24.64.41')": 1,
"('AS6128 Cablevision Systems Corp.', '69.116.62.88')": 1,
"('AS6805 Telefonica Germany', '2.240.20.127')": 1,
}
In Angular:
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col" >{{selectedGroup}}</th>
<th scope="col">{{selectedColumn}}</th>
<th scope="col">Hits</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of mvaHits | keyvalue">
<td>{{item.key[0]}}</td>
<td>{{item.key[1]}}</td>
<td>{{item.value}}</td>
</tr>
</tbody>
</table>
How can I fix this?
Appreciate the help :)
