01-24-2024 01:45 PM
Hello,
I need to convert the following array of object into an object of key value pairs.
Input:
Expected output:
Thank you for your help!
01-25-2024 01:28 AM - edited 01-25-2024 01:28 AM
Hi @Max ,
You can try the reduce function in the mapper snap. You'll need to set {} (an empty object) as the initialElement and apply the extend function to put all array elements into the initialized empty object.
$ranges.reduce((accum, currentValue) => accum.extend(currentValue), {})
Hope this helps!
BR.