Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html JSON显示方法_Html_Ajax_Json - Fatal编程技术网

Html JSON显示方法

Html JSON显示方法,html,ajax,json,Html,Ajax,Json,我有一个场景,我可以利用您的帮助获得最佳实践和高效代码 我有一个JSON数组,如下所示 [ { "Date": "2014-07-16", "DiscPoint": "Description 1", "DisBy": "Person 1" }, { "Date": "2014-07-16", "DiscPoint": "Description 2", "DisBy": "Per

我有一个场景,我可以利用您的帮助获得最佳实践和高效代码

我有一个JSON数组,如下所示

[
    {
        "Date": "2014-07-16",
        "DiscPoint": "Description 1",
        "DisBy": "Person 1"
    },
    {
        "Date": "2014-07-16",
        "DiscPoint": "Description 2",
        "DisBy": "Person 2"
    },
    {
        "Date": "2014-07-16",
        "DiscPoint": "Description 3",
        "DisBy": "Person 3"
    }
]
如何在迭代JSONArray时省略第一个元素,请注意,只有在第一次迭代之后才必须省略它

我需要显示每个新日期的日期。请帮我解决这个问题。

单位为$。每个函数只需添加if语句,它将跳过第一个索引,该索引等于0

$.each(yourArray, function(index, value) {
    if (index != 0) {
        // do something
    }
});

我无法发布该图像,因为我没有那么多的声誉如何向我们展示您尝试过的代码。您使用什么语言来迭代此数组?$document.readyfunction{$'table.fadeIn;$.getJSONhttp://localhost:7001/MOM_Project/service/read,functiondata{$.eachdata,functionkey,值{$'table tr:first'。在''+value.Date+''+value.DiscPoint+''+value.DisBy+''';};};};我不知道你的意思-请注意,我只有在第一次迭代之后才必须省略它。你能解释一下吗?