have been Googling to find out the syntax for getting the flask url data to getJSON..can anyone point me to where that is? thanks

1 Answer 1


The jQuery doc for getJSON says it takes a url as an argument. (First hit with "jquery getJSON" search using Google).

The flask doc for url_for (first hit from internet search for "flask url_for" and searching the document) offers another link for Quickstart.

The (supplied) search function shows the pieces in action (no google required :)

function search(query, syncResults, asyncResults)
    // get places matching query (asynchronously)
    var parameters = {
        q: query
    $.getJSON(Flask.url_for("search"), parameters)
    .done(function(data, textStatus, jqXHR) { 

I hope this helps.

  • yes it does thanks..I was missing the syntax for Flask.url_for
    – cfdphd
    Jul 6, 2017 at 1:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .