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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:56:24+00:00 2026-06-04T06:56:24+00:00

so im creating this situation where a count down happens, when it counts down

  • 0

so im creating this situation where a count down happens, when it counts down to zero, a ajax post is fired off, php thens returns a json_encoded array and i would like to loop threw this array and .remove things that need to be removed and .appendTo things that need to be added. however, i seem to have a hard time accessing an element from that json object returned from the server…. im getting undefined in the console log

jquery:

    $.ajax({
            url: "morphelo/splash.php",
                type: "POST",
                data: "x=<?=md5('countdown')?>&CountdownType="+type+"&id="+ID+"&what=<?md5('drop')?>",
                datatype: "html",
                success: function(data){ 
data = // {"19e0fa430b5a0437b87cf5bf7a365011":{"clutch-1337653726-445648193-0a6e039a028dd9a64239473ff08c82c6":"sub-clu-li**clutch-1337653726-445648193-0a6e039a028dd9a64239473ff08c82c6"}}

    var x = type.split('/');// 19e0fa430b5a0437b87cf5bf7a365011/unclock
        var m = x[0]; // 19e0fa430b5a0437b87cf5bf7a365011
    var y = $.parseJSON(data);
    console.log(y);
    console.log(m);
    console.log(data.m) // but it says undefinded.....          
            }
        });
  • 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-04T06:56:25+00:00Added an answer on June 4, 2026 at 6:56 am

    Your data.m doesn’t work, because data is a string.

    You probably meant to access m in the decoded version of data, which you called y:

    console.log(y[m]);
    

    I’m using [m] instead of .m because m starts with numerics.

    Btw

    If you’re always going to decode the HTML into JSON, you can also set the datatype of the $.ajax options to 'json'.

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

Sidebar

Related Questions

I've been reading this post Creating a login form in CodeIgniter based on Ion
let's get some different points of view about this situation I have. I'm creating
I have access only to .NET, and I have this situation. At creating an
I have this situation: I've an enum and I'm creating a datagrid composed of
I have been working on and off with Java/Python. Now in this situation I
I am creating this link tag: <link rel=canonical href=<%= request.url %> /> The problem
I had a huge file for creating this GUI and I have shortened it
Seems I've outdone myself. All the while I was creating this pretty little 'latest
nobody loved my first question about this: Creating Entity Framework objects with Unity for
I am creating table like this: CREATE TABLE foobar (id uniqueidentifier, foo text, bar

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.