Convert to Object
Transforms a list into an object with extracted key-value pairs.
Last updated
Transforms a list into an object with extracted key-value pairs.
Last updated
Feedback
⬆️ CannyCopyright © 2024 Rewst
This transform allows you to convert a list of objects into a single object, creating each object's property using user-defined key-value pairs extracted from the list, and simplifying the handling of complicated list structures.
Parameter | Description | Required |
---|---|---|
For nested field names, separate them by dots (e.g., details.age
).
The Convert to Object
transform provides a powerful way to reshape your data to meet specific requirements. The ability to define keys and values, including the ability to access nested data, makes it versatile for a range of scenarios. Let's go through a couple of use-case examples to demonstrate how this transform can be applied to your data.
In both of these examples, your new output object would look as follows:
You've learned how to simplify complex lists using the Convert to Object
transform. Remember, the key to using this transform effectively is understanding your data's structure and identifying the appropriate key-value pairs that will make your object meaningful.
This transform is especially useful when dealing with data structures like ConnectWise PSA Custom Fields or Communication Items.
List to Transform
The list of objects you want to transform into a single object. Each item in the list should be a object with key-value pairs.
Field to use as Key
The field name from the items in your list that you want to use as keys in your new object.
Field to use as Value
The field name from the items in your list that you want to use as values in your new object.