I have a project where I have to get JSON data from one API endpoint and then pull some data from this JSON data and send it to another API.
From first API I am getting this data:
response ={
"abc":"AP003",
"data":[
{
"d":{
"e":"some data",
"f":"some data"
}
}
]
}
I extract data from this and send it to another view.
response = response.json()
response = response['data']
return JsonResponse(json.dumps(response),safe=False)
Even below code does not work
response = response.json()
response = response['data']
return JsonResponse(response,safe=False)
When I do this I get response but data I get is in string form and not in JSON form. How to get JSON data and send it to template as it is?
Edit:
I have a JSON in a string format and I want it to send as JSON form in my API response
/after every word.