I am calling an API and I am getting a JSON response like the one above:
{
"data": {
"styles": [
{
"groups": [
{
"product": [
{
"code": "0000001",
"date": null
}
]
},
{
"product": [
{
"code": "0000002",
"date": "2020-05-02T00:00:00.000Z"
}
]
},
{
"product": [
{
"code": "0000003",
"date": "2020-04-22T00:00:00.000Z"
}
]
}
]
},
{
"groups": [
{
"product": [
{
"code": "0000011",
"date": "2020-05-12T00:00:00.000Z"
}
]
},
{
"product": [
{
"code": "0000012",
"date": "2020-05-12T00:00:00.000Z"
}
]
}
]
}
]
}
}
I am not familiar with handling JSON and this one is super nested. All I want to do is to create a tuple (or a dict) which would look like:
(0000001, null)
(0000002, 2020-05-02T00:00:00.000Z)
(0000003, 2020-04-22T00:00:00.000Z)
(0000011, 2020-05-12T00:00:00.000Z)
(0000012, 2020-05-12T00:00:00.000Z)
Could you please advice me one how to do that?