---
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 pros..."
url: "https://hashnode.com/posts/how-to-check-if-an-object-is-present-in-an-array-in-ruby/66426be78dcd7434ad232363"
---

[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?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 pros...

May 13, 2024 · 3 min read · blog.alexandrecalaca.com  
Read the article

-   [#ruby](https://hashnode.com/tag/ruby)
-   [#alexandrecalaca](https://hashnode.com/tag/alexandrecalaca)

## 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.
