1

I have a certain JSON object already setted in my HTML code, which via Jinja2 I receive and proceed to perform actions with.

let selectedJson = {{json | safe}}

This is the way I send it in the first place:

@app.route('/pad/analizador222/', methods=['POST', 'GET'])
    def analizador222():
        littleJSON = {"something" : "something-else"}
        mode = 1
        return render_template("output.html", json = littleJSON , mode = mode )

Now, after I did some stuff with the object, I need to re-send it back to another "@app.route()" via an HTML LINK, for example:

<a>This is the link I need to click on to send the previously mentioned JSON</a>

Here's the other app.route()

@app.route('/analisis-conversaciones', methods=['POST', 'GET'])
    def analisisconversaciones():
        return render_template("analysis.html")

I need to do some other stuff that does not matter at the moment with that JSON in "analysis.html"

The question is:

How can I send that JSON object via a common HTML link?

I think POST protocol can help, but in that case I don't know how to use it.

0 Answers0