Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7984993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:26:47+00:00 2026-06-04T11:26:47+00:00

Out of the following the last one does not work: puts node.elasticsearch[:plugin][:jetty][:name] puts node.elasticsearch[:plugin][‘jetty’][:name]

  • 0

Out of the following the last one does not work:

puts node.elasticsearch[:plugin][:jetty][:name]
puts node.elasticsearch[:plugin]['jetty'][:name]
puts node.elasticsearch[:plugin]["'#{entry}'"][:name]

What syntax do I need to follow in order to use a variable’s value in the index when accessing a multi dimensional array?

UPDATE:
I think entry is a String but I could be wrong so here’s the statement that sets it up for you the educated helper to determine what’s what:

Dir.entries("/var/plugins/").any? do |entry|
    puts node.elasticsearch[:plugin][:jetty][:name]
    puts node.elasticsearch[:plugin]['jetty'][:name]
    puts node.elasticsearch[:plugin]["'#{entry}'"][:name]
end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T11:26:48+00:00Added an answer on June 4, 2026 at 11:26 am

    Your hash is indexed with symbols, so you should convert your string into a symbol, with entry.intern().

    puts node.elasticsearch[:plugin][entry.intern][:name]
    

    Edit: to_sym and intern are aliases of the String class. So entry has to be a string, which it seems to be according to your attempts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 <h:form> elements following each other (not one within the other) such
I really can't figure this one out... I'm trying to achieve the following result
check out the following test: http://binks.knobbits.org/webgl/texture3.html It's a simple test of cube textures. It
Please check out the following func and its output void main() { Distance d1;
I was trying out the following code which actually saves the pdf file to
Please check out my following code... public enum LogType { Debug, Info, Warn, Error,
I want to find out the following: given a date ( datetime object), what
Is there an algorithm for figuring out the following things? If the result of
I'm wondering why this code section prints out the following: print request.user.has_perm('bug_tracking.is_developer'): + str(request.user.has_perm('bug_tracking.is_developer'))
I am new in Symbian UIQ. So anyone can help me out about following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.