SnIPPETsX › Merge company context into each profile row for Supabase
Merge company context into each profile row for Supabase
JavaScript · updated Oct 14, 2026 · 23 lines
main.js
// Merge company context into each profile row for Supabase
const company = $('Parse Company Data').first().json;
const out = [];
for (const item of $input.all()) {
const p = item.json;
out.push({
json: {
company_url: company.company_url || '',
company_name: company.company_name || '',
industry: company.industry || '',
keywords: (company.keywords || []).join(', '),
profile_name: p.fullName || p.name || p.title || '',
profile_headline: p.headline || p.subtitle || '',
profile_title: p.jobTitle || p.position || '',
profile_location: p.location || p.addressWithCountry || '',
profile_url: p.profileUrl || p.url || p.linkedinUrl || '',
profile_company: p.companyName || p.currentCompany || '',
raw: JSON.stringify(p),
created_at: new Date().toISOString()
}
});
}
return out;
Run this JavaScript snippet
Open this snippet on SnIPPETsX to run the JavaScript code in your browser, edit it together with others in real time, or fork it into your own copy. No install or account is needed.