---
title: "Discussion on \"How to check if an object is present in an array in Ruby?\" | Hashnode"
description: "Discussion on \"How to check if an object is present in an array in Ruby?\". TL;DR: include? is the best approach\n\n\nGreetings\nHey, It's Alexandre Calaça here. Hope you're good.\n\nIntroduction\nToday, let's work on 3 different approaches to check if an object is present in the array in Ruby. Every approach has their cons and pro..."
url: "https://hashnode.com/posts/how-to-check-if-an-object-is-present-in-an-array-in-ruby-1/61db980f3ce4b2377adfe2be"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to check if an object is present in an array in Ruby?](https://blog.alexandrecalaca.com/how-to-check-if-an-object-is-present-in-an-array-in-ruby-1?utm_source=hashnode&utm_medium=feed)

TL;DR: include? is the best approach Greetings Hey, It's Alexandre Calaça here. Hope you're good. Introduction Today, let's work on 3 different approaches to check if an object is present in the array in Ruby. Every approach has their cons and pro...

Jan 4, 2020 · 3 min read · blog.alexandrecalaca.com  
Updated May 15, 2023  
Read the article

-   [#ruby](https://hashnode.com/tag/ruby)
-   [#ruby-on-rails](https://hashnode.com/tag/ruby-on-rails)
-   [#programming](https://hashnode.com/tag/programming)

## Written by

[Alexandre Calaça](https://hashnode.com/@alexandrecalaca)

@alexandrecalaca

  
[View profile](https://hashnode.com/@alexandrecalaca)

I'm a passionate software developer.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
