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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:30:13+00:00 2026-05-29T05:30:13+00:00

I have the following javascript object: result = { banking6dig:{ GM-B-001:{ releaseDate:2/2/2012 14:44,noOfHex:3,versInfo:6 digit

  • 0

I have the following javascript object:

result = {
    "banking6dig":{
        "GM-B-001":{
            "releaseDate":"2/2/2012 14:44","noOfHex":"3","versInfo":"6 digit Banking"
        },
        "GM-B-002":{
            "releaseDate":"1/2/2012 14:46","noOfHex":"3","versInfo":"6 digit Banking with changes"
        }
    },
    "paynpark":[]
} 

Explanation:

“banking6dig” and “paynpark” are applications
“banking6dig” has two subversions : “GM-B-001” and “GM-B-002”
“paynpark” has no subversions.

Additionally, each subversion has its own properties,viz, “releaseDate”, “noOfHex”, and “versInfo”.

This object “result” is built after a php request, so it can have any number of apps and subversions; the format, however is ALWAYS the same.

I have tried this on jsFiddle: http://jsfiddle.net/2JLtZ/1/

  1. How do I find out the number of “subversions” in each “app”? (I get some 40 “subversions”!)
  2. How do I add an app to the object “result”, e.g., “electricity” with its properties reset?
  3. How do I add a subversion to “paynpark”, e.g. “fixedRate”?
  4. How do I modify a subversions properties, for example change “releaseDate” of “GM-B-001” to “3/12/2012 14:46”?
  • 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-29T05:30:14+00:00Added an answer on May 29, 2026 at 5:30 am

    1.

    var i=0;
    for (var j in result['banking6dig']) i++;
    alert('banking6dig has '+i+' subversions'):
    

    2.

    result.electricity={}
    

    3.

    paynpark.fixedRate={};
    

    Thanks AlienWebguy for pointing this out.

    4.

    result['banking6dig']["GM-B-001"]["releaseDate"]="3/12/2012 14:46";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following json data in a Javascript variable result : [ Object
I have following resourceBundle Javascript object. var resourceBundle = { en : { MSG1
I have the following JavaScript object. When the window resizes, I want it to
I have the following javascript object being returned from a WCF call, this has
I have the following javascript object containing a multi-value email property: var contact =
I have the following javascript code: $.get(categories/json_get_cities/ + stateId, function(result) { //code here },
I have the following JSON object in javascript returned by a PHP web service
I have the following JavaScript code: alert(data.status); data is a JSON object, one of
I have the following javascript: $.ajax({ type: "POST", dataType: "json", url: "/Home/Submit", data: {
I have the following JavaScript code to pop up a window in Internet Explorer.

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.