I am new to working with ejs, and I would like to render only certain values of my JSON in a table through using ejs. This is currently how I am rendering my JSON, and although I am only specifying name, it is returning all values
<%= data !== 'name' ? data : '' %>
I would like to return values as follows:
icon | filter 1 name | category name
all side by side.
Does anyone know if this is a possibility with ejs?
Here are some relevant lines of code that might provide some additional context
backend:
const data = JSON.stringify(results, null, 2)
console.log(results.technologies[0].name)
Front end:
try {
const data = await fetch('/', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: url
})
}).then(res => {
document.open()
res.text().then(function(text) {
document.write(text)
});
question from:
https://stackoverflow.com/questions/65854552/render-only-certain-values-of-json-in-table-format 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…