Skip to content

Instantly share code, notes, and snippets.

View felipedaraujo's full-sized avatar

Felipe de Araujo felipedaraujo

View GitHub Profile
@felipedaraujo
felipedaraujo / hasura-console-download.js
Created November 23, 2023 23:02
Download data from Hasura console into CSV
// Get all table rows with class 'rt-tr'
let rows = document.querySelectorAll('.rt-tr');
// Function to clean and format cell text
let cleanText = (text) => {
return text.trim().replace(/"/g, '""');
};
// Initialize CSV content with header
let csvContent = 'email,first_name,last_name\n';