fields

Specifies the fields that will be used from the DataSource, their type and how they are retrieved. Can be one of:

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

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

2. An object literal of the form

{ path: "path.to.field", type: "Number|String|Date|Boolean", nullable: true|false }

var dataSource = new shield.DataSource({
    schema: {
        fields: {
            id: { path: "productId", type: Number },
            name: { path: "productName", type: String },
            category: { path: "category.name", type: String },
            available: { path: "productAvailable", type: Boolean },
            price: { path: "unitPrice", type: Number },
            added: { path: "dateAdded", type: Date }
        }
    }
});