add: JSON filtered

This commit is contained in:
odweta
2026-09-07 15:21:34 +02:00
parent 48c2d73e77
commit 0d804bf9f4
+6 -1
View File
@@ -6,8 +6,13 @@ const cheerio = require("cheerio");
function filterJson(data) { function filterJson(data) {
var filtereddata = []; var filtereddata = [];
data.forEach(element => { data.forEach(element => {
filtereddata.push(); filtereddata.push({
url: element.url,
title: element.title,
content: element.content
});
}); });
return filtereddata;
} }
async function handleSearch(req, res) { async function handleSearch(req, res) {