I have JSON data from a URL, I wanna pass it into a search box suggestion/autocomplete, I'm using flask framework.
so how I can make a post request with the payload of every letter click and handle it from the backend with flask and return the values as a search bar suggestions
JSON example:
{
"spider":[ // if the user typed spider
{
"t":"Spider-Man: No Way Home (2021)",
},
{
"t":"Spider-Man: Far from Home (2019)",
},
{
"t":"Spider-Man: Homecoming (2017)",
},
{
"t":"Spider-Man: Into the Spider-Verse (2018)",
},
{
"t":"Spider-Man (2002)",
},
{
"t":"The Spiderwick Chronicles (2008)",
}
]
}
The JSON data is changeable depending on what the user typed , I cant store all the values locally it's a live API.
please help.