0
点赞
收藏
分享

微信扫一扫

服务器与普通电脑的区别,普通电脑是否可以作为服务器使用

山竹山竹px 03-25 19:30 阅读 3

天梦星服务平台 (tmxkj.top)icon-default.png?t=N7T8https://tmxkj.top/#/

1.第一步 需要一个数组数据

      

{
                "week": "全部",
                "hOutName": null,
                "weekendPrice": null,
                "channel": "门市价",
                "hOutId": 98,
                "cTime": "2024-03-18 15:42:07",
                "weekdayPrice": 120.00,
                "arithmeticType": null,
                "sId": 1,
                "pOutId": null,
                "pOutName": null,
                "changePriceType": "指定金额",
                "holidayPrice": null,
                "startTime": "2024-03-20",
                "endTime": "2024-03-20",
                "id": 34,
                "cUserCode": "19969123206",
                "changePriceRule": null
            },
            {
                "week": "全部",
                "hOutName": null,
                "weekendPrice": null,
                "channel": "门市价",
                "hOutId": 98,
                "cTime": "2024-03-18 15:40:41",
                "weekdayPrice": 12.00,
                "arithmeticType": null,
                "sId": 1,
                "pOutId": null,
                "pOutName": null,
                "changePriceType": "指定金额",
                "holidayPrice": null,
                "startTime": "2024-03-20",
                "endTime": "2024-03-21",
                "id": 33,
                "cUserCode": "19969123206",
                "changePriceRule": null
            },

2.第二步 需要一个程序员把以下方法复制进去

const data = [{
    "week": "全部",
    "hOutName": null,
    "weekendPrice": null,
    "channel": "门市价",
    "hOutId": 98,
    "cTime": "2024-03-18 15:42:07",
    "weekdayPrice": 120.00,
    "arithmeticType": null,
    "sId": 1,
    "pOutId": null,
    "pOutName": null,
    "changePriceType": "指定金额",
    "holidayPrice": null,
    "startTime": "2024-03-20",
    "endTime": "2024-03-20",
    "id": 34,
    "cUserCode": "19969123206",
    "changePriceRule": null
}];

const valueToMatch = "门市价"; // 需要匹配的值

const result = data.filter(item => {
    return Object.values(item).some(val => val?.toString().includes(valueToMatch));
});

console.log(result);

3.第三步 你可以关闭页面了

            好孩子 加油!

举报

相关推荐

0 条评论