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 6359629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:32:38+00:00 2026-05-24T23:32:38+00:00

ok. i have several custom objects. These objects are filled with arrays. I have

  • 0

ok. i have several custom objects. These objects are filled with arrays.
I have a drop down with choices. I want to be able to get an object by its name, using a variable based on the dropdown choice.

as for the object, as the title says, i am speaking about a new object created by myself. I have searched high and low unsuccessfully, so far as i can tell, to get the variable to locate this object. sample code is as follows.

myobject1 = {
property1 : ['arr1', 'arr2', 'arr3'],
property2 : ['arr1', 'arr2', 'arr3'],
property3 : ['arr1', 'arr2', 'arr3']
}
myobject2 = {
property1 : ['arr1', 'arr2', 'arr3'],
property2 : ['arr1', 'arr2', 'arr3'],
property3 : ['arr1', 'arr2', 'arr3']
}

function getmyobject(){
var1 = mydd.value; //contains 'myobject1'
//code to strip and filter out non-alphanumerics and spaces, also to lcase
var2 = window.var1;
for (conditions to loop){
    //code to make the loop spit out i for each array inside of object
}

it returns an undefined unless i replace window.var1 with window.objname where objname is the actual name of the object, thus defeating the dynamicism of the whole thing.

  • 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-05-24T23:32:39+00:00Added an answer on May 24, 2026 at 11:32 pm

    Use window[var1] (I guess var1 is a string).

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

Sidebar

Related Questions

I have to serialize several objects inheriting from WebControl for database storage. These include
I have a custom class Person. Several Person objects have been created and added
I have several TextBoxes, which display angular values. I format these using different custom
I'm using a custom JLayeredPane. I have several Shapes which needed to be drawn
I have custom coded several enterprise applications for mid to large organizations to use
I have read several documentations about building custom ErrorHandler (by inheriting from IErrorHandler). Unfortunately,
I have a custom SharePoint page with several dataviews. The dataviews essentially filter documents
I have a custom UITableViewCell which contains several UIButtons. Each button's frame position is
(sorry about the long title) I have a custom object Person, which in turn
I created a custom object that has a Bitmap field. I'm drawing several of

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.