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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:36:38+00:00 2026-06-13T09:36:38+00:00

I need to parse this json with javascript { MasterProducts: { MasterProduct: [ {

  • 0

I need to parse this json with javascript

    {
     "MasterProducts": {
    "MasterProduct": [
      {
        "Productcode": "0903-000192",
        "Description": "ICROCOMPUTER;32FX200 24BIT QFP 132P",
        "ThumbPic": "NoImage.png",
        "RRP": "41.400000",
        "Stock": "0"
      },
      {
        "Productcode": "0160-030",
        "Description": "AXIS MPEG-4 Decoder 50-user licence pack onto 50 separate computers. For all Axis MPEG-4 products that do not support AAC audio encoding. (210 211 210A 211A 213 214 221 225FD 231D+ 232D+ 241S 241Q 241SA 241QA 242SIV 243SA 282 282A).",
        "ThumbPic": "NoImage.png",
        "RRP": "35.230000",
        "Stock": "0"
      },
      {
        "Productcode": "0160-040",
        "Description": "AXIS MPEG-4 +ACC Decoder 50-user license onto 50 separate computers. For all Axis products that supports MPEG-4. (207 207W 207MW 212PTZ 216FD 223M).",
        "ThumbPic": "NoImage.png",
        "RRP": "50.880000",
        "Stock": "0"
      },
      {
        "Productcode": "10403E",
        "Description": "Hotsync palm computer cradle/docking station",
        "ThumbPic": "NoImage.png",
        "RRP": "0.000000",
        "Stock": "2"
      },
      {
        "Productcode": "0903-000193",
        "Description": "ICROCOMPUTER;32FX200 24BIT QFP 132P",
        "ThumbPic": "NoImage.png",
        "RRP": "37.790000",
        "Stock": "0"
      }
    ]
  }
}

I have managed to do it when it’s only one result with this code

 if(data !== '')
    {
        xmlData = data.childNodes[0].childNodes[0].data;
        objData = app.XML2OBJ(xmlData);            
        var item = objData.MasterProduct.Description;
        //alert(item);
    }

But can’t get it to work with multiple sets of results.

  • 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-13T09:36:39+00:00Added an answer on June 13, 2026 at 9:36 am

    As people have been discussing in the comments above, you can simply use normal vanilla JavaScript to access the data.

    var data = // JSON 
    
    console.log(data.MasterProducts.MasterProduct[0].Productcode);
    

    Will give you 0903-000192. Objects that contain square brackets [] are arrays. For them you can use the array notation of arr[0]. For objects, you can use their key names.

    {
    "MasterProducts": {
     "MasterProduct": [
       {
         "Productcode": "0903-000192",
         "Description": "ICROCOMPUTER;32FX200 24BIT QFP 132P",
         "ThumbPic": "NoImage.png",
         "RRP": "41.400000",
         "Stock": "0"
       }
     ]
    }
    

    MasterProducts is your root object, so you can use it as your entry point.

    var products = data.MasterProducts;
    

    Now, to get the first element of the list of products you could use array notation.

    products.MasterProduct[0]
    

    To get at one of the properties of that element, you could then again use the dot notation –

    products.MasterProduct[0].Description //"ICROCOMPUTER;32FX200 24BIT QFP 132P"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: how to parse json in javascript I need to parse this JSON
I need to parse this json and get the itemvotecounts, and firstrankvotescounts. [ [
I have this JSON http://www.progmic.com/ielts/retrive.php that I need to parse. When I do it
I have get an xml file from a WebService <MasterProducts> <MasterProduct> <Productcode>023DDC</Productcode> <Description>Dell CRT
I have a JSON string in my javascript, I need to send this to
I am trying to parse a JSON response from a server using javascript/jquery. This
i need to parse this php xml response in android: <?phpxml version=1.0 encoding=utf-8?> <SmsResponse>
I have string as abvd.qweqw.sdfs.a=aqwrwewrwerrew . I need to parse this string and get
8,5,,1,4,7,,,,7,,1,9,3,6,,,8,6,3,9,,2,5,4,,,,,3,2,,,7,4,1,1,,4,,6,9,,5,,,,5,,,1,,6,3,,,6,5,,,,7,4,,1,7,6,,,,8,,5,,,7,1,,3,9, I'm doing a programming challenge where i need to parse this sequence into
In the streams I am parsing I need to parse something in this pattern:

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.