---
title: "Discussion on \"Mapping Records to arrays\" | Hashnode"
description: "Discussion on \"Mapping Records to arrays\". I needed this functionality to parse a configuration regardless of whether it was supplied as an array or a Record. This function converts the Record into an array of the same type:\nfunction mapRecordToArray<T, R extends Omit<T, K>, K extends keyof T..."
url: "https://hashnode.com/posts/mapping-records-to-arrays/641851af489b9b823c505890"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Mapping Records to arrays](https://brense.hashnode.dev/mapping-records-to-arrays?utm_source=hashnode&utm_medium=feed)

I needed this functionality to parse a configuration regardless of whether it was supplied as an array or a Record. This function converts the Record into an array of the same type: function mapRecordToArray<T, R extends Omit<T, K>, K extends keyof T...

Oct 6, 2022 · 1 min read · brense.hashnode.dev  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)

## Written by

[Rense Bakker](https://hashnode.com/@brense)

@brense · Den Haag, Netherlands

  
[View profile](https://hashnode.com/@brense)

Freelance fullstack developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
