Trying to fetch JSON data from third party url and bring it to my backend route. First, I am getting query string entered into my application's url and store them to variables and use it in third party url. Second and third query strings are not entering into the url although the query string from application url has been stored properly. Wondering if there is a proper way of doing such thing.
Also, when the JSON data is fetched, is there a way to make the format it cleaner, rather than single line of an object of 47 arrays that is overflowed into 4 lines?
app.get("/api/posts", (req, res) => {
const first = req.query.first;
const second = req.query.second;
const third = req.query.third;
axios.get(`url.com?first=${first}&second=${second}&third=${third}`)
.then(response=> res.json(response.data)
.catch(err => res.send(err))
})