$('#dateFrom').offset().top
if
все фрукты, а не текущий.var arr = [];
var fruits = [
{id: 1, type: 'apple', price: 52},
{id: 2, type: 'apple', price: 76},
{id: 3, type: 'orange', price: 48},
{id: 4, type: 'orange', price: 52},
{id: 5, type: 'apple', price: 32},
{id: 6, type: 'pineapple', price: 52},
{id: 7, type: 'apple', price: 88},
{id: 8, type: 'pineapple', price: 66},
{id: 9, type: 'apple', price: 52},
{id: 10, type: 'pineapple', price: 88},
];
for(var i = 0; i<fruits.length; i++){
if (fruits[i].type !== "apple") {
arr.push(fruits[i]);
}
}
console.log(arr);
$('html,body').animate({scrollTop: $('#dateFrom').offset().top}, 400);
debugger;
$('html,body').animate({scrollTop: $('#dateFrom').offset().top}, 400);