@jagaad/utils
    Preparing search index...

    Function recordToChoices

    • Converts a record to an array of choices.

      const record = { '1': 'Option 1', '2': 'Option 2' };
      const choices = recordToChoices(record);
      console.log(choices); // [{ id: '1', name: 'Option 1' }, { id: '2', name: 'Option 2' }]

      Parameters

      • record: Maybe<Readonly<Record<string, string>>>

      Returns Choice[]