mirror of
https://github.com/neosubhamoy/neosubhamoy-portfolio.git
synced 2025-12-19 17:03:01 +05:30
(refactor): implemented object,array based search result categories and multi table search on backend and frontend
This commit is contained in:
@@ -105,7 +105,14 @@ function perform_search(searchInput, searchDef, searchRes) {
|
||||
inject_no_results(response);
|
||||
}
|
||||
else {
|
||||
inject_search_results(response);
|
||||
const resultTags = [...new Set(response.map(item => item.tag))];
|
||||
const result = {};
|
||||
|
||||
resultTags.forEach(tag => {
|
||||
result[tag] = response.filter(item => item.tag === tag);
|
||||
});
|
||||
console.log(result);
|
||||
inject_search_results(result.project);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
|
||||
Reference in New Issue
Block a user