I don't know how to select specific items from jsonnified object in my web application using flask

37 views Asked by At
response = requests.get(url)
response_json = response.json()
results = response_json['a'][0]
output = results['a_1'] + results['a_2'] + results['a_3']
return jsonify(output)

my output
"abcdefg"

what I want
abcdefg

I'm creating a web app using heroku and when I open the web application I want to return the output without "". I mean to display output without "".

How should I fix it?

1

There are 1 answers

3
Abdur-Rahmaan Janhangeer On BEST ANSWER

Write

return output

instead of

return jsonify(output)

Returning a string returns a string without the quotes. Jsonifying returns a representation of JSON.