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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:58:05+00:00 2026-06-06T14:58:05+00:00

Jquery Each Json Values Issue This question is similar to above, but not the

  • 0

Jquery Each Json Values Issue

This question is similar to above, but not the same before it gets marked duplicated.

After realasing how to use computed values i came across another issue.

In my javascript i have the following code:

var incidentWizard = ['page1.html','page2.html','page3.html'];
var magicWizard = ['page1.html','page2.html','page3.html'];
var loadedURL = 'page1.html';

The input to this function would be (true,’incident’)

function(next,wizardname)
 {

   var WizSize = incidentWizard.length; 
    wizardName = [wizardName] + 'Wizard';

   var wizardPOS = jQuery.inArray(loadedURL,incidentWizard);

And now i want to use the wizardname parameter to decide what array i am going to use…

Loader(incidentWizard[wizardPOS],true);

Ive also tried

Loader([incidentWizard][wizardPOS],true);

and

Loader([incidentWizard][wizardPOS],true);

Also the loader function just required the string value in the array at wizardPOS sorry for confusion

But when trying this i always end up with the outcome…

/incidentWizard  

I know this is something to do with using computed values but i’ve tried reading about them and cant seem to solve this issue.

Basicly i want to use the computed value of wizardName to access an an array of that name.

Please help supports, looking forward to seeing many ways to do this!

  • 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-06T14:58:06+00:00Added an answer on June 6, 2026 at 2:58 pm

    On this line:

    wizardName = [wizardName] + 'Wizard';
    

    You are attempting to concatenate the string ‘Wizard’ to an Array with one string element “incident”. I’m assuming you just want regular string concatenation:

    wizardName = wizardName + 'Wizard';
    

    However, now you only have a string, not an array instance. To fix that, change the way you define your *Wizard arrays to something like:

    var wizardyThings = {
        incidentWizard : ['page1.html','page2.html','page3.html'],
        magicWizard: ['page1.html','page2.html','page3.html']
    };
    

    Then your function (which is missing a name as it stands), becomes:

    function someMethod(next, wizardname) {
    
        wizardName = wizardName + 'Wizard';
        var wizSize = wizardyThings[wizardName].length;
    
        var wizardPOS = jQuery.inArray(loadedURL, wizardyThings[wizardName]);
        ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looping through json return values with jQuery's $.each() and adding the classes
For example: > function foo() { > jQuery(whatever).each( function() { return; // this just
jQuery(.single_writing).each(function(){ jQuery(this).click(function(){ jQuery(#thisTickets).val(); jQuery(#my_iframe).contents().find('.ticket_id').each(function(){ jQuery(this).click(function(){ if (jQuery(this).attr(checked)==true){ jQuery(#thisTickets).val(jQuery(#thisTickets).val()+jQuery(this).attr(id)+, ); } }); }); }) });
jQuery('ol.productList li.product input[name*=cart.pAsin.]').load().each(function(){ // each function var asinId = jQuery(this).val(); var pUrl = jQuery(this).siblings(a).attr('href');
This jquery ui dialog is filled with html and form values from an ajax
I'm trying to access YQL with jQuery but am not getting a response: http://jsfiddle.net/tastyapple/grMb3/
I started my hands on training on Jquery AJAX JSON this morning. I have
Hey friends can you help me out with this issue. I have a JSON:
I know this issue has been touched on before, e.g. here: How to post
I've googled around, but i can find a way to build json with jQuery

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.