Skip to content

Commit

Permalink
rm unused
Browse files Browse the repository at this point in the history
  • Loading branch information
bennettfrazier committed Oct 3, 2024
1 parent c10fa6f commit 94e87e2
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -1092,46 +1092,6 @@ document.getElementById('downloadSelected').addEventListener('click', function (

const unescapedCombinedData = unescapeCombinedData(combinedData);

// function extractDataByKeys(data, parentIdentifier, keys) {
// const result = [];

// // If type is array, extract data from each item in the array
// if (Array.isArray(data)) {
// data.forEach(item => {
// extractDataByKeys(item, parentIdentifier, keys);
// });
// }

// function traverse(node, currentPath) {
// if (typeof node !== 'object' || node === null) return;

// if (currentPath.join('.') === parentIdentifier) {
// const extractedData = {};
// keys.forEach(key => {
// if (node.hasOwnProperty(key)) {
// extractedData[key] = node[key];
// }
// });
// result.push(extractedData);
// }

// for (const key in node) {
// if (node.hasOwnProperty(key)) {
// traverse(node[key], currentPath.concat(key));
// }
// }
// }

// traverse(data, []);
// return result;
// }

// const parentIdentifier = "response.content.text.included";
// const keysToExtract = ["firstName", "lastName", "headline"];
// const extractedData = extractDataByKeys(unescapedCombinedData, parentIdentifier, keysToExtract);

// console.log('Extracted Data:', extractedData);

downloadJSON(unescapedCombinedData, 'selected_entries.json');
} else if (exportType === 'grouped') {
const groupedData = {};
Expand Down

0 comments on commit 94e87e2

Please sign in to comment.