ejsのうまい使い方についてChatGPTに聞いてみた

本日のプロンプトエンジニヤリング。
==
I have a nodejs json document composed of many fields, each of which has its own types such as text or number or boolean. I have to render this document in two modes. one for viewing it and another for editing it.
In the viewing mode, all the text type fields are rendered as a static textnode, whereas in the editing mode its rendered as a editable textbox for instance. Rendered in the case of boolean type field, should be the textnode in the viewing mode and radiobuttons in the editingmode and so on.
but I don't want to prepare and maintain two layouts for each modes, rather, I would prefer to prepare and maintain a single layout using css display grid table at once and would like to switch between two modes by somehow utilizing the power of ejs but the final concrete implementation plan wont come up to my mind and could you help me out how can I implement such a page utilizing full power of ejs.
==
ChapGPT様、今日も本当にありがとうございました。
必死でググるなんてもう何カ月もやっていません。
そんな手動きわまる作業なんてやっていられません。
あれもそういう時代だったからやっていただけのこと。
以上。チャオ!