I have scenario where I could use your help for the best practice and efficient code.
I have a JSON Array like below
[
{
"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"
}
]
How do I omit the first element while iterating the JSONArray, Please note I have to omit it only after the first iteration.
I need to display the date for every new date. Please help me out in this scenario.
In $.each()
function just add if-statement which will be skipping first index, which is equal to 0.
$.each(yourArray, function(index, value) {
if (index != 0) {
// do something
}
});