/**
* 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 => {
// 値が0より大きいかチェック
if (item['field_kr1zcs45'] > 0) {
// 0より大きい場合は100に設定
item['field_kr1zcs45'] = 100;
} else {
// それ以外の場合は0に設定
item['field_kr1zcs45'] = 0;
}
});
return data;
}