Angular 8 : How Filter JSON data in localStorage

I’m working in Angular 8 project I’m storing some data in localStorage and I need to filter it, I’m not sure which method I have to use.

this how localStorage values looks :

[{id: 9, designation: "spectacle + restaurant", gift: [], type: "Soirée Bon plan",…},…]
0: {id: 9, designation: "spectacle + restaurant", gift: [], type: "Soirée Bon plan",…}
amount: 60
banner: ""
designation: "spectacle + restaurant"
format: "bb"
gift: []
icon: "/uploads/fe633f32ab883aae44f154f3fead6982.png"
id: 9
qte: 2
type: "Soirée Bon plan"
1: {id: 10, designation: "spectacle + restaurant", gift: [], type: "Soirée Détente",…}
amount: 80
banner: ""
designation: "spectacle + restaurant"
format: "A4"
gift: []
icon: "/uploads/9b44814145c711307c718cdaf87dc4e2.png"
id: 10
qte: 2
type: "Soirée Détente"
2: {,…}
placesListContent: [{tr_id: "628215", tr_sp_id: "12055", tr_entite: "AG", tr_cat_ordre: "1", tr_cat: "Tarifs :",…}]
qte: 1
restaurant: null
spectacle: {sp_id: "12055", sp_date: "1551737475", sp_th_id: "1264", sp_cat_id: "3", sp_prod_id: "0",…}
3: {,…}
placesListContent: [,…]
qte: 1
restaurant: null
spectacle: {sp_id: "7903", sp_date: "1448480535", sp_th_id: "1254", sp_cat_id: "6", sp_prod_id: "1481",…}

I need only to get the elements which represent “GiftType object” ( first and second element here) which I have got it with this function :

addGiftToCard(type) {
    type = type.type
    let cardParse = JSON.parse(localStorage.getItem('cart')) || []
    let index = _.findIndex(cardParse, item => item.type && item.id == type.id)
    if (index == -1) {
      type.qte = 1
      cardParse.push(type)
    } else {
      cardParse[index].qte += 1
    }
    localStorage.setItem('cart', JSON.stringify(cardParse))

  }

the two first elements must be filtered and separated by “qte” attribute

Source: New feed
Source Url Angular 8 : How Filter JSON data in localStorage