everybody. I have lightning component on which I need to display some fields. Set of fields are dynamic and I`m displaying it using aura:iteration (I have a wrapper with name and label of field, its value and type). But I do not know, which tag use for displaying field, because it may be checkbox or date or anything else. Maybe, somebody already had such problem and can help me to solve this problem. Thank you for help.
force:outputField depending on your need. SF will take care of outputting the correct type
A component that provides a concrete type-specific output component implementation based on the data to which it is bound. Represents a read-only display of a value for a field on a Salesforce object. This component respects the attributes of the associated field and how it should be displayed. For example, if the component contains a date and time value, then the default output value contains the date and time in the user's locale. Bind the field using the value attribute and provide a default value to initialize the object.