MappingObject

Defines how each field in the data source is parsed and presented in the Flexmonster UI.

Properties

In the MappingObject, keys are unique names of the fields from the data source, and values are objects with the following properties:

Property/TypeDescription
captionStringoptionalThe field's caption that will be displayed everywhere in the component's UI. If the caption is not specified, it is the same as the field’s unique name. Learn more about setting field captions.
typeStringoptionalThe field's data type. If the type is not specified, the field's data type is resolved automatically. Learn more about specifying field types.

Example

dataSource: {  
  type: "json",  
  data: [  
    ["price", "item", "order_date"],  
    [100, "Headphones", "2025-04-12"]  
  ],  
  mapping: {  
    "price": {  
      caption: "Price",
      type: "float"
    },  
    "item": {  
      caption: "Item",
      type: "string"
    },  
    "order_date": {  
      caption: "Order Date",
      type: "date"
    }  
  }  
}

See also