There is such a JSON record of this type.
[{"name":"Книга1","price":"860","img":"KI_OBL_BOOK41.png"},{"name":"Книга2","price":"860","img":"OBL_BOOK41.png"},{"name":"Text1","price":"680","img":OBL_SBORNIK_NPA%20(8)mak.jpg"}]" Please tell {"name":"Книга2","price":"860","img":"OBL_BOOK41.png"} how to delete all the line {"name":"Книга2","price":"860","img":"OBL_BOOK41.png"} if there is Book2 in it, which matches the value from JSON
var cookie = Cookies.get("book") re = new RegExp("Книга",'ig'); $.each(JSON.parse(cookie), function(i,e){ if(e.match(re) ) delete(e) })
delete(e)to do. With this approach, by the way, you remove all relevant entries, not duplicates - teran