Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1945 | deleting search_meta from CSV download
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Oct 17, 2024
1 parent 9026120 commit cc179a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/common/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ export const arrayToCSV = objArray => {
let str = `${Object.keys(array[0]).map(value => `"${value}"`).join(",")}` + '\r\n';

return array.reduce((str, next) => {
delete next.search_meta;
str += `${Object.values(next).map(value => isObject(value) ? `"${JSON.stringify(value)}"` : `"${value}"`).join(",")}` + '\r\n';
return str;
}, str);
Expand Down

0 comments on commit cc179a1

Please sign in to comment.