Such as and jquery processing File not found

  node.js, question

There is such a processing function in app.js generated by express:

app.use(function(err, req, res, next) {
 res.status(err.status || 500);
 res.render('error', {
 message: err.message,
 error: {}
 });
 });

Err.jade is rendered using the template rendering engine and returns a json, which the jade engine can automatically interpret as a string, but instead of using jade template rendering, it uses

app.set('view engine', 'html');
 app.engine('.html',require('ejs').__express);
 app.use(function(err, req, res, next) {
 res.status(err.status || 500);
 res.render('error.html', {
 message: err.message,
 error: {}
 });
 });

Directly rendering html files, how to use jquery in html inside to obtain json sent by res.render () and process it?
I just learned node, but I still don’t understand a lot of things. Please forgive me for common sense mistakes.

jquery? Has nothing to do with jquery?

If you want to get json objects from the render function in ejs, just use the local variable directly.