#100768
admin
Keymaster

Hi Gerhard,
With mapping, you can use:

var data = [
{text1: 'abcde', object: {num1: 123}},
{text1: 'abcde', object: {num1: 123}},
{text1: 'abcde', object: {num1: 123}},
{text1: 'abcde', object: {num1: 123}},
{text1: 'abcde', object: {num1: 123}}
];
Smart('#grid', class {
get properties() {
return {
dataSource: new Smart.DataAdapter({
mapChar: '.',
dataSource: data,
dataFields: [
{name: 'text1', dataType: 'string'},
{name: 'num1', map: 'object.num1', dataType: 'number'}
]
}),
columns: [
{ label: 'Text 1', dataField: 'text1' },
{ label: 'Number', dataField: 'num1' },
]
}
}
});

Hope this helps.
Regards,
Peter
Smart UI Team
https://www.htmlelements.com/