Lets say I have an array that looks like this:
[{"id":23,"site_id":13, "name":"Test 1","date":"2019-01-26T11:02:18.5661283","category":"some cats"},
{"id":151,"site_id":15, "name":"Test 2","date":"2018-11-04T10:50:53.1756567","category":"some cats"}]
I need to search by site_id in this array and display the found ones:
so I did something like this which doesn't work:
var siteID = 13;
$.each(myArray.filter(
            function (el) { 
               return el.site_id !== siteID ;
            }), 
            function( index, value ) {
                var fo = '<p>'+el.name+'</p>';
                $('.forms').append(fo);
            });
Can someone please advice on this?
 
     
     
     
     
    