JSFiddle - React, Tailwind, and code Playground

by Pritesh Patel

JavaScript

// const beaconConfigValues = [
  //   { key: "bd", value: bd },
  //   { key: "bh", value: bhValue },
  //   { key: "qms", value: qms },
  //   { key: "sv", value: svValue },
  // ];
  // const filteredValues = beaconConfigValues
  //   .filter((beaconConfig) => beaconConfig.value)
  //   .map((filteredBeaconConfig) => ({
  //     [filteredBeaconConfig.key]: filteredBeaconConfig.value,
  //   }))
  //   .join(",");
  // const obj = {
  //   bd,
  //   bh: bhValue,
  //   qms,
  //   sv: svValue
  // }
  // const stringObj = JSON.stringify(obj);