I am working with an API (which I have no control over) that returns a response with hundreds of duplicate keys:
{
"user": {
//...
},
"user": {
//...
},
//...
}
Using response.json()
will only return one object, since it will overwrite any duplicate keys. Is there any way I can take the full response from response.text
and turn it into something that I can parse to json?