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

  • Home
  • SEARCH
  • 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 6348543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:26:26+00:00 2026-05-24T21:26:26+00:00

Here is my JSON returned from a PHP file (just as a side note,

  • 0

Here is my JSON returned from a PHP file (just as a side note, I can use EITHER one):

// JSON Option #1:

[{“field”:”title_of_production_row”, “required”:”1″}{“field”:”where_released_row”, “required”:”1″}{“field”:”release_date_row”, “required”:”1″}{“field”:”running_time_row”, “required”:”1″}{“field”:”accepting_award_row”, “required”:”1″}{“field”:”contact_name_row”, “required”:”1″}{“field”:”promocode_row”, “required”:”0″}{“field”:”payment_method_row”, “required”:”1″}{“field”:”tbl_submit”, “required”:”0″}{“field”:”production_company_row”, “required”:”1″}]

// JSON Option #2:
{“title_of_production_row”:”1″,”where_released_row”:”1″,”release_date_row”:”1″,”running_time_row”:”1″,”accepting_award_row”:”1″,”contact_name_row”:”1″,”promocode_row”:”0″,”payment_method_row”:”1″,”tbl_submit”:”0″,”production_company_row”:”1″}

I want to loop through each field and required, and alert them. I’ve tried things like:

    $.ajax({
        url: './ajax/get_cat_info.php?cid=' + cid,
        dataType: "jason",
        async: false,
        success: function(html) {
            alert(html);

         $.each(html, function(key, val) {
            alert('key: ' + key + ' - val: ' + val);
         });

        }
    });

But this alerts individual characters. Any thoughts?

  • 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-24T21:26:26+00:00Added an answer on May 24, 2026 at 9:26 pm
    $.ajax({
        url: './ajax/get_cat_info.php?cid=' + cid,
        dataType: "json", // Need a correct dataType
        async: false,
        success: function(html) {
            alert(html);
    
         $.each(html, function(key, val) {
            alert('key: ' + key + ' - val: ' + val);
         });
        }
    });
    

    JSON Option 1 was invalid: Try this:

    [
        {
            "field": "title_of_production_row",
            "required": "1"
        },
        {
            "field": "where_released_row",
            "required": "1"
        },
        {
            "field": "release_date_row",
            "required": "1"
        },
        {
            "field": "running_time_row",
            "required": "1"
        },
        {
            "field": "accepting_award_row",
            "required": "1"
        },
        {
            "field": "contact_name_row",
            "required": "1"
        },
        {
            "field": "promocode_row",
            "required": "0"
        },
        {
            "field": "payment_method_row",
            "required": "1"
        },
        {
            "field": "tbl_submit",
            "required": "0"
        },
        {
            "field": "production_company_row",
            "required": "1"
        }
    ]
    

    For future reference, a great resource is JSONLint.com which allows you to validate your JSON on the fly.

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

Sidebar

Related Questions

Here's my problem. I have data being returned using JSON, AJAX from my php
Here is my Json returned from the server {ErrorCode:1005,Message:Username does not exist} Here is
Here's the JSON string returned from my action: [{Key:Likes,Value:1},{Key:Loves,Value:0},{Key:Dislikes,Value:0},{Key:Message,Value:Your vote has been changed}] Here's
I'm trying to parse the JSON returned from SocialMention. Here's an example of what
Currently I'm using the helper methods outlined here to return some JSON from my
Ok so i have the json object returned back from my script and I
I have the following JSON structure, being returned from an AJAX call (pseudo values)
I have JSON returned from my server like: { user: { nickname: Ann, width:
I have developed a script that receives json data from a php script using
I am upgrading from jQuery 1.3.2 to jQuery 1.5 and I can't get JSON

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.