Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 1794

Dynamic property name

$
0
0

Hello,

I need to create an object with a single property with a dynamic name.

let key = "meh" // imagine any expression that returns a string here
let a = { key: 4 } // doesn't work

How can I achieve such a thing?


Viewing all articles
Browse latest Browse all 1794

Trending Articles