score:0

import { usersRowData as filters } from "./otherFile";

score:0

const filters = [
  {
    label: "name",
    options: [
      { value: "Dietrich", label: "Dietrich" },
      { value: "Patricia", label: "Patricia" }
    ]
  },
  {
    label: "username",
    options: [
      { value: "Kamren", label: "Kamren" },
      { value: "Bret", label: "Bret" }
    ]
  },
  {
    label: "email",
    options: [{ value: "Sincere@april.biz", label: "Sincere@april.biz" }]
  }
];

function App() {
  return (
    <section>
    {filters.map(data => {
      const label = <label> {data.label} </label>
      return (
        <section>
            {label}
          <select>
            {data.options.map(option => {
              return(
                <option value={option.value}> {option.value} </option>
              )
            })}
          </select>
        </section>
      )
    })}
    </section>
  )
}

Related Query

More Query from same tag