I am trying this git example.
Which works well when I integrated it with my project, but what I want to achieve is to send json as a response to the client/request,
Create new route, e.g.: /jsonSend with res.json in it and make successRedirect: '/jsonSend'. That should do it.
/jsonSend
res.json
successRedirect: '/jsonSend'