Convert array to object

The output is of the above form. Here root element(Array) is of the form of an array. How do we make it of the form of an object?

To get the idea of the json form, the above is the json view of the output. In that, you can see that “d” is an array.

I want the output to be of the above form. Please do help. Thanks in advance.

have you tried a mapper with javascript such as outlined here:

or perhaps the structure snap?

The extend() method can be used to create objects dynamically from other objects passed in as arguments. In your case, it looks like the objects in the ‘$Array’ field do not have overlapping keys, so you can directly use the array as the arguments to extend. However, you cannot just pass ‘$Array’ to extend(), you need to use the spread operator to indicate that the elements of the array should be treated as the arguments to the function, like so:


The {} part just creates an empty object for us to call extend() on.

There are a few other examples of using the extend() method in the community, like this one.

Thanks a lot… It helped…