// Update 2021 revenue = 2022 revenue for all companies const RAW = RAW_OLD; RAW.forEach(co => { if (co.annual_data['2021']) { // Revenue 2021 not available - leave null co.annual_data['2021'].revenue_b = null; co.annual_data['2021'].sales_growth_pct = null; } });