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

  • Home
  • SEARCH
  • 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 8053885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:59:39+00:00 2026-06-05T07:59:39+00:00

This is a quick question, I hope you could help me with. How can

  • 0

This is a quick question, I hope you could help me with.

How can I use a string to navigate into a object?

If I have this:

var string = something;

And a object like this:

var this = {
    something: {
        other: "okay"
    }
}​;

How can I then use the string to do like this:

this.+string+.other

Which would be the same as:

this.something.other

?? Not a quick one maybe, but do you understand where I’m going?? 🙂

  • 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-05T07:59:41+00:00Added an answer on June 5, 2026 at 7:59 am

    Try using [] below,

    var _this = {
        something: {
            other: "okay"
        }
    }​;
    
    _this[string].other
    

    Note: changed var name to _this as var this = <..something..> will throw you an error. Also this means currect execution object/window object in javascript.

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

Sidebar

Related Questions

I have a quick and hopefully simple question that I hope someone can help
I have a quick question i hope you guys can answer, i've got a
I've got a quick question that I hope someone can help me with. I'm
Hi there just a quick question I hope someone can help me with I
I hope this is a quick question I hope. I need to write some
hope this will be a quick easy question, I've just tried my app on
quick question: why wont this while-loop wait for input? (ing is a string) while(ing
This is just a quick question in C#. I have a scenario where I
I have a quick question about this PHP function here. What is the am
Quick question, how can I make this valid : if($this->datos->bathrooms == 1½){$select1 = JText::_(

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.