Home > @uniformdev/canvas > FlattenValuesOptions

FlattenValuesOptions interface

Signature:

Properties

<table><thead><tr><th>

Property

</th><th>

Modifiers

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

levels?

</td><td>

</td><td>

number

</td><td>

(Optional) If the property has nested properties, like Blocks or Assets can, then how many levels should we traverse.

You can set this to Infinity although it would be more advisable, for performance, to use the number you need in your code.

Where: levels=0 will only extract the properties of the current object levels=1 will include any child blocks or assets on the current object but not any grandchildren

1

</td></tr> <tr><td>

toSingle?

</td><td>

</td><td>

boolean

</td><td>

(Optional) Take only the first item from an array of values, flatten it and return it as a single object

</td></tr> </tbody></table>