首页 > 解决方案 > 根据键删除数组中的值

问题描述

我有一个给定键值格式的数组。

数组->

    [{
        "Name": "A",
        "Place": "A",
        "Comments": "A"
    },
    {
        "Name": "B",
        "Place": "B",
        "Comments": "B"
    },
    {
        "Name": "C",
        "Place": "C",
        "Comments": "C"
    }]

我需要使用 Javascript 删除与“地点”一词相关的所有值,以获得与此类似的结果。

数组->

    [{
        "Name": "A",
        "Comments": "A"
    },
    {
        "Name": "B",
        "Comments": "B"
    },
    {
        "Name": "C",
        "Comments": "C"
    }]

如何才能做到这一点?

标签: javascriptarrays

解决方案


推荐阅读