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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:05:25+00:00 2026-06-01T15:05:25+00:00

hi i am updating the keyIndex array, which is created in object, while i

  • 0

hi i am updating the keyIndex array, which is created in object, while i add the array to URL it’s not work:

my code :

var dataObject = {
    Indices: {
        subIndex: {
            keyIndex: [], //this is not updating in baseURL 'keyIndex'
            method: 'GetCCINationalIndicesData',
            baseURL: 'http://107.20.173.235/BlufinAPI/Service/ConsumerConfidenceIndex.svc/GetCCINationalIndicesData?InputJSON={"IndexID":"' + keyIndex + '","FromMonth":"10","FromYear":"2011","ToMonth":"3","ToYear":"2012"}'
        }
    },
    Geography: {
        0: '1',
        tiers: {
            method: 'GetCCITierIndicesData'
        },
        regions: {
            method: 'GetCCIRegionIndicesData'
        },
        city: {
            method: 'GetCCICityIndicesData'
        }
    },
    Demographics: {}
}

anything wrong?

  • 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-01T15:05:26+00:00Added an answer on June 1, 2026 at 3:05 pm

    It’s because keyIndex is evaluated only once when the baseURL string is created.

    You could make baseURL a function instead…

    baseURL:function() {
        return 'http://107.20.173.235/BlufinAPI/Service/ConsumerConfidenceIndex.svc/GetCCINationalIndicesData?InputJSON={"IndexID":"' + 
                this.keyIndex + 
                '","FromMonth":"10","FromYear":"2011","ToMonth":"3","ToYear":"2012"}';
    }
    

    Then call it like a function…

    dataObject.Indices.subIndex.baseURL();
    

    Although the original keyIndex was not a reference to the object property in the first place.

    And this has nothing to do with jQuery.

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

Sidebar

Related Questions

While updating a third party library to work correctly on x64 (it's using int
While updating my UI code (C# in a .NET 4.0 application), I ran into
Updating an inherited drupal site and I'm trying to add php code to the
While Updating a Field of a Grid View (which is Varchar) the updated value
After updating to Parsec 3.1 from 2.x, code using many1, such as word =
While updating a datatime column in a table from another table, i noticed that
I am having trouble updating a jlabel in a method. here is my code:
Updating: The php is considering the code beyond the EOM; closing tag. Here is
After updating to Twitter Bootstrap 2.0 (which is awesome), the navigation links inside submenus
While updating a DataTable to a SQL Server database I get the error message

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.