Flask-Json How do i return mutiple rows as json objects
问题 I have a users column and i am trying to output all of its data on an html file via json and ajax. i am able to return multiple columns from a single row. But i am unable to figure out how to return and call multiple rows. Here is my code and also a couple of commented thing i have tried. @app.route('/test', methods=['POST', 'GET']) def test(): #thisworks works = user.query.filter_by(name = 'foo').first() return jsonify(name = works.name, id = works.id) #BELOW LINES DONT WORK #st = user.query