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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:41:54+00:00 2026-05-23T00:41:54+00:00

Im new on GM. Iv’e run into an problem on an array segment. Here

  • 0

Im new on GM.
Iv’e run into an problem on an array segment. Here is the code:

var A1_rest= '';
var A1reset_go          = false;
var auctiontyp = 0

var myJson              = '{"d":[["","","y","ZAR","1","49517","6458, 8270, 8270, 8270, 7635",null,"1.40","6458","0:13:30","","12","","C","30",null],["y","-00:00","y","ZAR","2","49593","6458, 6458, 6458, 6458, 6458",null,"2.92","6458","0:13:37","","12","","L","12","Ve4mYdrvkkQMKxBH1\/1VMtDTCDQBRspg5jB8jjY08zg="],["","","y","ZAR","3","49058","7456, 9216, 6458, 5153, 7456",null,"194.40","7456","0:00:31","","1100","","T",null,null],["","","y","ZAR","4","49597","2935, 6554",null,"1.22","2935","0:01:16","","12","","T",null,null],["","","y","ZAR","5","49590","4440, 0518, 5343, 2625, 4848",null,"0.95","4440","0:15:58","","5","","L",null,null],["","","y","ZAR","6","49591","4848, 4440, 4440, 0518, 2625",null,"1.81","4848","0:16:05","","12","","L",null,null],["","","y","ZAR","7","49595","6458",null,"5.55","6458","0:04:13","","55","","T",null,null],["","","y","ZAR","8","49596","",null,"2.90","NONE","0:04:35","","29","","T",null,null],["","","y","ZAR","9","49496","6458, 2427, 2427, 7863, 5845",null,"2.56","6458","0:06:07","","10","","B",null,null],["","","y","ZAR","10","49524","6458, 2427, 7863, 7863, 5845",null,"1.67","6458","0:06:00","","5","","B",null,null],["","","y","ZAR","11","49539","6458, 2427, 7863, 7863, 0764",null,"2.02","6458","0:04:25","","10","","B",null,null]]}'
var jsonObj             = $.parseJSON (myJson);

//--- The JSON should return a 2-D array, named "d".
var arrayOfAuctions     = jsonObj.d;

//--- Loop over each row in the array.
$.each (
    arrayOfAuctions,
    function (rowIndex, singleAuctionData) {

        //--- Print the 7th column.
          console.log ('Row: ' + (parseInt (rowIndex) + 1) + ' Column: 7  Value: ' + singleAuctionData[6]);
  //up to here its fine


  auctiontyp=parseInt (singleAuctionData[4]);
   if (auctiontyp== 1)

     {

   A1_rest=singleAuctionData[16];
       alert(A1_rest);
       alert(singleAuctionData[16]);
        //2 alerts not the same...?
       if (A1_rest != 'null')
         {alert('doing incorrectly');
          A1reset_go=true;
          };
        else
          {alert('success1');
           }
       alert('check5.1');
       alert(A1reset_go);
       if (A1_rest == 'null') and (A1reset_go==true)
         {alert('should also not run but does');
          A1reset_go=false; 
          A1_start=singleAuctionData[8];
         };
         else 
         {alert('success2');
          };
    };

my current problem is on :”A1_rest” and “singleAuctionData[16]”

I thought “singleAuctionData[16]” will be a text value of “null” , but it isnt, it is some other value, although, on an alert it gives an output of “null”. I’m unsure how to test for it. In this scenario, on the array in the first segment, (which im testing) it should execute “success1” and “success2”. On the second segment of the array, if i run the same test , it should only alert “doing incorrectly” and “success2”.
Can someone please help me? Thanks in advance.
Ludwig

  • 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-23T00:41:55+00:00Added an answer on May 23, 2026 at 12:41 am

    You are expecting a “text value of null”, but I think the actual value is just null, or nothing, rather than the text 'null'.

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

Sidebar

Related Questions

New day, new problem :-) Code: Client Side: void abw_Closed(object sender, EventArgs e) {
New Google Analytics code looks like one below: <script type=text/javascript> var _gaq = _gaq
New to iPhone app development, I have a problem compiling (or Build and Run)
New guy here so bear with me. Ive got a basic XSL file that
(New to ASP.NET here.) I have a user control which should check for a
New to DDD here and have a architecture question which should be a typical
New to this, so sorry if it's really silly. My problem is as follows.
New formtastic user here. I have a relationship user has_many clients In formtastic ,
New Android developer here; well versed in Java. I'm looking to create a playlist
New to Rails... here goes: If I want my 'create' method to respond differently

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.