Frequently we have a necessity to convert an array to object.
I know the syntax using map, braces and parentheses already exists, but this syntax is very loaded and difficult to understand.
Current Syntax Example:
{(array map {($$): $})}
I created a function to facilitate our transformation on this and called it plumb because it makes the process different from pluck which is converting object to array. Here's the example of the function I created:
Frequently we have a necessity to convert an array to object.
I know the syntax using map, braces and parentheses already exists, but this syntax is very loaded and difficult to understand.
Current Syntax Example:
I created a function to facilitate our transformation on this and called it plumb because it makes the process different from pluck which is converting object to array. Here's the example of the function I created:
Expected output: