How to filter and get array by id?

const id = [1, 4, 10]
const data =[{id: 1, name: Banana}, {id: 2, name: Mango}, {id: 3, name: Chili}, {id: 4, name: WaterMelon},  {id: 10, name: WaterMelon}]

I tried filter It’s showing me empty value. I want to remove matched by id in an array.

117 thoughts on “How to filter and get array by id?”

  1. Good day! Do you know if they make any plugins to assist
    with Search Engine Optimization? I’m trying to get my
    blog to rank for some targeted keywords but I’m not seeing very good results.
    If you know of any please share. Many thanks!

    Reply
  2. Hi there just wanted to give you a quick heads up and let you know a few of the pictures aren’t loading correctly.

    I’m not sure why but I think its a linking issue.
    I’ve tried it in two different web browsers and both show the same outcome.

    Reply
  3. You actually make it appear really easy with your presentation however I find this topic to be really something which I believe I would never understand.
    It sort of feels too complex and very large for me.
    I’m taking a look ahead to your next submit, I’ll attempt to get the hang of
    it!

    Reply
  4. Great blog! Is your theme custom made or did you download it from somewhere?
    A design like yours with a few simple tweeks would really make my blog stand out.
    Please let me know where you got your design. Cheers

    Reply
  5. With havin so much content do you ever run into
    any problems of plagorism or copyright violation? My site has a
    lot of exclusive content I’ve either authored myself or outsourced
    but it looks like a lot of it is popping it up all over the web without my permission. Do you know any
    ways to help protect against content from being ripped off?

    I’d truly appreciate it.

    Reply
  6. Hello there, I found your site via Google at the same time
    as looking for a similar matter, your website came up, it seems to be great.
    I’ve bookmarked it in my google bookmarks.
    Hi there, simply become aware of your weblog thru
    Google, and found that it’s really informative. I am going to be careful for brussels.
    I’ll be grateful if you happen to proceed this
    in future. A lot of other folks will probably be benefited out of your writing.
    Cheers!

    Reply

Leave a Comment