-1

I have a Json data, where I want to get the value of "authorization" i.e "OToken DEDC1071B77800A146B6E8D2530E0429E76520C151B40CC3325D8B 6D9242CBA3A6BFA643E7E5596FBEBAE0F46A1FB1BCD099EBC1F59D CD82F390B6BC45FCE036F37F7F589BD687A691E1378F1FF432331C 62E7E641E857C8F8A405A4BFE2F01B1EB8F3C69817D45F5DDE9DEE 346ACABA1B7208DECA9E43CCE7AB3761553E23D9CB36A870C1819C 15C7C4B1CFE2802DFD05F651AA537AB81787.4145535F55415431" using python

{
"links":[
{
"method":"GET",
"rel":"self",
"href":"https://www.sampleurl.com/request"

},
{
"headers":{
"authorization":"OToken
DEDC1071B77800A146B6E8D2530E0429E76520C151B40CC3325D8B
6D9242CBA3A6BFA643E7E5596FBEBAE0F46A1FB1BCD099EBC1F59D
CD82F390B6BC45FCE036F37F7F589BD687A691E1378F1FF432331C
62E7E641E857C8F8A405A4BFE2F01B1EB8F3C69817D45F5DDE9DEE
346ACABA1B7208DECA9E43CCE7AB3761553E23D9CB36A870C1819C
15C7C4B1CFE2802DFD05F651AA537AB81787.4145535F55415431"

},

"valid_date":"2020-08-17T15:49:00+0530",
"method":"POST",
"rel":"redirect",
"href":"https://www.billdesk.com/pgi/MerchantPayment/",
"parameters":{
"mercid":"BDMERCID",
"bdorderid":"OAFC19XTFD8TSP"

}
}
]
}
3

1 Answer 1

0
import json

response = YOUR_JSON_STRING

data = json.loads(response)

authorization = data['headers']['authorization']
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.