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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:40:10+00:00 2026-06-17T07:40:10+00:00

My JSON object has the following structure : { key : [ {keya1:value1, keya2:value2,

  • 0

My JSON object has the following structure :

{ key :
[
{keya1:value1,
keya2:value2,
keya3:[value31,value32...]
keya4:value4
},
{keyb1:value1,
keyb2:value2,
keyb3:[value31,value32...]
keyb4:value4
},
...
..
{keys1:value1,
keys2:value2,
keys3:[value31,value32...]
keys4:value4
}
]
}

I tried using a simple json.parse but it doesnt work.
With such a structure how should i go about parsing so that i can safely iterate over each instances of key and display all keya-valuea,keyb-valueb.. pairs for values of key?
Many thanks!

EDIT : I actually omitted quotes on purpose. The original JSON data HAS quotes around keys and values.Sorry i didnt mention it earlier.

  • 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-17T07:40:11+00:00Added an answer on June 17, 2026 at 7:40 am

    Try using getJsonArray

    JSONObject json = (JSONObject) JSONSerializer.toJSON(response);
    
    JSONArray array= json.getJSONArray("key");
    

    or getString("key"); where applicable

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

Sidebar

Related Questions

I have parsed a json object that has the following structure: { data =
I've serialized an object using Newtonsoft's JSON serializer, and the DateTime has come through
I have the following json object. var json1 = {00 : 00, 15 :
I have MySQL database, where I store the following BLOB (which contains JSON object)
Happy New Year :-) I have the following JSON object: { \OutcomeSummaryID\:105, \DeliveryDetailsID\:9, \AttemptedDeliveryModesIDList\:[1,5],
I've got the following JSON structure that defines a table and it's data. var
I'm trying to make a JSON call library. It has the following features. be
I want to do the following. Pass a complex json object in a hidden
The Java object has to be serialized into a json string in the servlet
I have seen a tutorial that has the following JSON: { books:[{title:frankenstein},{title:Moby Dick}] }

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.