/**
* Apply custom processing to the returned data
* Returned data reference: https://www.yuque.com/yida/support/xgg4ps
* data: the returned data
* extraInfo: { meta: [], cardParams: {} }, where meta is the data metadata and cardParams is the Card parameter information
*/
function afterFetch(data, extraInfo) {
data.forEach(item => {
// Check whether the value is greater than 0
if (item['field_kr1zcs45'] > 0) {
// If greater than 0, set it to 100
item['field_kr1zcs45'] = 100;
} else {
// Otherwise, set it to 0
item['field_kr1zcs45'] = 0;
}
});
return data;
}