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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:46:51+00:00 2026-05-22T19:46:51+00:00

options: [‘Unknown’, ‘AL’, ‘AK’, ‘AZ’, ‘AR’, ‘CA’, ‘CO’, ‘CT’, ‘DE’] This is my Options

  • 0
options: ['Unknown', 'AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE']

This is my Options Array and there are 47 states in all. i don’t want to add it like this. Instead can i add something like this

options: [StateValue] Which would read all the values from the Object.

var StateValue = {
    Unknown: 0,
    AL: 1,
    AK: 2,
    AZ: 3,
    AR: 4,
    CA: 5,
    CO: 6,
    CT: 7,
    DE: 8,
    FL: 9
};
  • 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-22T19:46:51+00:00Added an answer on May 22, 2026 at 7:46 pm

    You can loop through an object like so

    var StateValue = {
        Unknown: 0,
        AL: 1,
        AK: 2,
        AZ: 3,
        AR: 4,
        CA: 5,
        CO: 6,
        CT: 7,
        DE: 8,
        FL: 9
    };
    
    for(var i in StateValue)
        console.log(i + " :: " + StateValue[i]);
    

    so you could populate your UI in that way

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

Sidebar

Related Questions

Are there some options somewhere where I can set the defaults, like the project
Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} ^http://agilerent.com$ [NC] RewriteRule ^(.*)$ http://www.agilerent.com/$1 [R=301,L] this is
What options are there for localizing an app on Google App Engine? How do
What options are there to achieve low-latency communication between two wars running in the
I have writen options to a <select> using something like Id.innerHTML = <option value='foo'>Foo</option>;
Trying to programmatically add options to a SELECT drop down in IE Windows Mobile.
Options: 1) When there is bad input, the app crashes and prints a message
Any options out there? Google Static Maps with SSL (HTTPS) is only available to
Which options are there to make your 3-Tier System. Client / Common / Server
What options are there to implement an own session management in ASP.NET? I just

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.