[英]I don't know how to select specific items from jsonnified object in my web application using flask
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我的 output
"abcdefg" “abcdefg”
what I want我想要的是
abcdefg abcdefg
I'm creating a web app using heroku and when I open the web application I want to return the output without "".我正在使用 heroku 创建一个 web 应用程序,当我打开 web 应用程序时,我想返回 Z78E622681F6393F14CE356"。 I mean to display output without "".
我的意思是在没有“”的情况下显示 output。
How should I fix it?我应该如何解决它?
Write写
return output
instead of代替
return jsonify(output)
Returning a string returns a string without the quotes.返回一个字符串会返回一个不带引号的字符串。 Jsonifying returns a representation of JSON.
Jsonifying 返回 JSON 的表示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.