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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:12:15+00:00 2026-06-14T20:12:15+00:00

I fill my key value array like this: /** * Callback: Gets invoked by

  • 0

I fill my key value array like this:

/**
 * Callback: Gets invoked by the server when the data returns
 * 
 * @param {Object} aObject
 */
function retrieveStringsFromServerCallback(aObject){

   for(var i = 0;i < aObject['xml'].strings.appStringsList.length;i++){
      var tKey = aObject['xml'].strings.appStringsList[i]["@key"];      
      var tValue = aObject['xml'].strings.appStringsList[i]['$'];
      configManager.addStringElement(tKey,tValue);

   }
}

Here is the setter of my object

/**
 * @param {string} aKey
 * @param {string} aValue
 */
this.addStringElement = function(aKey, aValue){
    self.iStringMap[aKey] = aValue;
    console.log("LENGTH: "+self.iStringMap.length);
}

I add about 300 key value pairs, according to google chrome inspector, the iStringMap is filled correctly. However the length of the array seems still to be 0. There must be something wrong. Any help much appreciated

  • 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-14T20:12:16+00:00Added an answer on June 14, 2026 at 8:12 pm

    You can get the count of object keys using:

    Object.keys(obj).length
    

    Object.keys() returns an array of keys of an object passed as a first parameter. And after that you’re accessing the .length of that array.

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

Sidebar

Related Questions

Is it possible to fill jQuery variable by PHP??? I mean something like this:
Hi; i have a question for calling wcf service. how to fill data array
i fill a tdictionary , read from a file, to iterate over the key-value-pairs.
I have a SortedList in my code. I fill inside it key value pairs.
I'm trying to populate a specific value of an array, defined by a key
i am trying to fill a foreign key value in child table with using
I have an array of key:value pairs containing a keyword found in the useragent
my primay key is user_id which is auto incremant UNSIGNED ZERO FILL , i
How do you fill reusable partials (like the header) in a Spring MVC web
I have a C structure like this : typedef struct ip_esp_private { /* keep

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.