path

Specifies the path to a particular field in the data objects. Can be one of:

1. A string value specifying the path to the underlying raw data field:

var dataSource = new shield.DataSource({
    schema: {
        fields: {
            id: { path: "productId" }
        }
    }
});

2. A function expression that is called once for each data item. The function accepts the data item as first argument and returns the field value in the correct format:

var dataSource = new shield.DataSource({
    schema: {
        fields: {
            id: function (item) {
                return parseInt(item.productId, 10);
            }
        }
    }
});