sp component base.dynamicproperty.trygetvalues - microsoft/Viva-Connections-Extensibility-Beta GitHub Wiki
Home > @microsoft/sp-component-base > DynamicProperty > tryGetValues
Returns the value of the object.
Signature:
tryGetValues(): TValue[];Returns:
TValue[]
the value associated with the dynamic property or an empty array if the source or the data doesn't exist.
If the value is NOT an array, then an array is returned with the value being the single entry; otherwise, the value itself is returned. If the property is undefined or cannot be found, an empty array will be returned.
NOTE: This api will always return an array and it assumes that the array is homogeneous. To retrieve a non-array value, use the DynamicProperty.tryGetValue() API.