Payload parser

Payload parser

Hi, I am trying to get a payload parser together to exclude some variables from a bucket.
Can anyone see a reason for this not working and where I am going wrong?

Many thanks.

//ignore certain variable

const ignore_vars = [
  'lora_bandwidth',
  'txinfo_frequency',
  'metadata_gateway_lat',
  'metadata_gateway_id',
  'metadata_gateway_h3index',
  'metadata_gateway_long',
  '0_time',
  '0_uplinkid',
  '0_gatewayid',
  'data',
  'confirmed',
  'fcnt',
  'dr',
  'adr',
  'devaddr',
  'deviceinfo_deviceclassenabled',
  'deviceinfo_deveui',
  'time',
  'deduplicationid'
];

payload = payload.filter(x => !ignore_vars.includes(x.variable));