Print this page

Dynamically Accessing Field Values in Lightning Expressions

Knowledge Article Number 000230743
Description When using Lightning Expressions, values in a value provider are accessed using named properties, separated by dots(periods).  
Ex: obj.colName
These named properties must be hard-coded values and can not be represented dynamically by a variable. 

Resolution One workaround for accessing all fields in a value provider is to use the {aura:iterate} method to iterate through all fields on the value provider, and save or use the value of the desired field. 

There is an idea in the Ideas Success Community that you can read about: lightning expressions by key access

promote demote