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 开发者_StackOverflow中文版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
};
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
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论