a single letter json you can return 2 data
example
@app.route("/dashboard", methods= ['GET'])
def key_index():
try:
key_index = db.sns.find({},{"_id":0}).sort([("datetime", -1)]).limit(1)
trend = db.sns_2.find({})
return dumps({
'key_index':key_index,
'trend':trend
})
except Exception as e:
return dumps({'error': str(e)})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…