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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:39:29+00:00 2026-05-16T20:39:29+00:00

I’m having problems adding a XHR request to query JSON to my script, I

  • 0

I’m having problems adding a XHR request to query JSON to my script,
I rarely work with either so it’s giving me a lot of problems. I know
that I will need to query a JS file, and that I will need to select
from matches in an array, but I am completely stumped on how to do it.
Something else I need to do is count matches each time I fire of a request.

The categories startList is what I am using now, it’s not really filled
in but I was just trying to get it to work first before I started using
JSON. Can anyone help me here?

var categories = [];

categories["startList"]                 = ["Men","Women"]
    categories["Men"]                   = ["Red","Blue","Multi"];
        categories["Red"]               = ["Leather","Metal","Ceramic","Plastic"];
            categories["Leather"]               = ["",""];
            categories["Metal"]                 = ["",""];
            categories["Ceramic"]               = ["",""];
            categories["Plastic"]               = ["",""];
        categories["Blue"]              = ["This","That","Neither"];
        categories["Multi"]             = ["One","Two","Other"];

    categories["Women"]                 = ["Green","Hot Pink","Multi"];
        categories["Green"]             = ["Them","Those","Moo"];
        categories["Hot Pink"]          = ["The","Quick","Brown"];
        categories["Multi"]             = ["Three","Four","Other"];



var nLists = 6; 

function fillSelect(currCat,currList){
var step = Number(currList.name.replace(/\D/g,""));
for (i=step; i

Here is a quick sample of one of the JSON fields I will want to query.

{ "idName": "The Time Teller", "forGender": "m", "caseDiameter": 1.5, "caseThickness": 0.5, "bandWidth": 0.78, "itemWeight": 1.44,{ "sku": 155320,{ "color1": "white", "color2": "none", "price": 59.99, "cat": "29400", "img": "155320-0002-front", "sku": 155411,{ "color1": "blue", "color2": "none", "price": 59.99, "cat": "32579", "img": "155411-0005-front", "sku": 160041,{ "color1": "black", "color2": "pink", "price": 59.99, "cat": "38404", "img": "160041-0001-front", }, "specialInformation": [ { "restrictions": "Available for US customers only." "detail": "Custom 3 hand Japanese quartz movement.", "detail": "100 meter molded polycarbonate case.", "detail": "Hardened mineral crystal.", "detail": "Locking looper and polycarbonate buckle.", }, { "desc": "Nixon's The Time Teller watch keeps it simpleton with hard case and custom molded polyurethane band."' } ] }
  • 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-16T20:39:30+00:00Added an answer on May 16, 2026 at 8:39 pm

    You have wrong JSON data. For example the blocks like

    { "color1": "white",  "color2": "none", "price": 59.99,
      "cat": "29400",     "img": "155320-0002-front",
    

    should be replaced to

    { "color1": "white",  "color2": "none", "price": 59.99,
      "cat": "29400",     "img": "155320-0002-front" },
    

    But it in not all errors. I recommend you verify your JSON data in http://www.jsonlint.com/. On http://www.json.org/ you will fnd the description of JSON format.

    Here is an example of a possible correct JSON data

    {
        "idName": "The Time Teller",
        "forGender": "m",
        "caseDiameter": 1.5,
        "caseThickness": 0.5,
        "bandWidth": 0.78,
        "itemWeight": 1.44,
        "items": [
            {
                "color1": "white",
                "color2": "none",
                "price": 59.99,
                "cat": "29400",
                "img": "155320-0002-front",
                "sku": 155411 
            },
            {
                "color1": "blue",
                "color2": "none",
                "price": 59.99,
                "cat": "32579",
                "img": "155411-0005-front",
                "sku": 160041 
            },
            {
                "color1": "black",
                "color2": "pink",
                "price": 59.99,
                "cat": "38404",
                "img": "160041-0001-front",
                "sku": 155320 
            } 
        ],
        "specialInformation": {
            "restrictions": "Available for US customers only.",
            "details": [
                "Custom 3 hand Japanese quartz movement.",
                "100 meter molded polycarbonate case.",
                "Hardened mineral crystal.",
                "Locking looper and polycarbonate buckle." 
            ],
            "desc": "Nixon's The Time Teller watch keeps it simpleton with hard case and custom molded polyurethane band." 
        } 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
Seemingly simple, but I cannot find anything relevant on the web. What is the
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a French site that I want to parse, but am running into

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.