output of print_answer
to json for flask app
#4806
-
I'm quite new to haystack, but loving the simplicity of it. I have made a flask app for web deployment. But I'm not able to get the final answer to json.dumps or jsonify as when I am trying to access print_answer give following output that I can store in variable How can I access the value of only |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey @siddheshgunjal! I guess you're calling Let me know if that works out. :) |
Beta Was this translation helpful? Give feedback.
-
@silvanocerza Yup! Figured out the same this morning only 😃 . Thanks for the reply! |
Beta Was this translation helpful? Give feedback.
Hey @siddheshgunjal!
I guess you're calling
print_answers(results)
or something similar.If you're doing so it should be enough to call
results["answers"]
to get the list of answers. Then you'll have a list of object, each object is a single answer.Let me know if that works out. :)