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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:39:29+00:00 2026-06-06T02:39:29+00:00

In Java, I’ve these key/value pairs passed by post (for example): form_id=undefined frmb[0][cssClass]=input_text frmb[0][required]=checked

  • 0

In Java, I’ve these key/value pairs passed by post (for example):

form_id=undefined

frmb[0][cssClass]=input_text

frmb[0][required]=checked

frmb[0][values]=First Name

frmb[1][cssClass]=input_text

frmb[1][required]=checked

frmb[1][values]=Last Name

frmb[2][cssClass]=textarea

frmb[2][required]=undefined

frmb[2][values]=Bio

frmb[3][cssClass]=checkbox

frmb[3][required]=undefined

frmb[3][title]=What's on your pizza?

frmb[3][values][2][baseline]=undefined

frmb[3][values][2][value]=Extra Cheese

frmb[3][values][3][baselise]=undefined

frmb[3][values][3][value]=Pepperoni

frmb[3][values][4][baseline]=undefined

frmb[3][values][4][value]=Beef

frmb[4][cssClass]=radio

frmb[4][required]=undefined

frmb[4][title]=Do you like pizza?

frmb[4][values][2][baseline]=checked

frmb[4][values][2][value]=Yes

frmb[4][values][3][baseline]=undefined

frmb[4][values][3][value]=No

frmb[5][cssClass]=select

frmb[5][multiple]=checked

frmb[5][required]=checked

frmb[5][title]=Select a pizza type:

frmb[5][values][2][baseline]=checked

frmb[5][values][2][value]=Margherita

frmb[5][values][3][baseline]=undefined

frmb[5][values][3][value]=Napoli

frmb[5][values][4][baseline]=undefined

frmb[5][values][4][value]=Marinara

I’ve to create the following json:

[{"cssClass":"input_text","required":"checked","values":"First Name"},{"cssClass":"input_text","required":"checked","values":"Last Name"},{"cssClass":"textarea","required":"undefined","values":"Bio"},{"cssClass":"checkbox","required":"undefined","title":"What's on your pizza?","values":{"2":{"value":"Extra Cheese","baseline":"undefined"},"3":{"value":"Pepperoni","baseline":"undefined"},"4":{"value":"Beef","baseline":"undefined"}}},{"cssClass":"radio","required":"undefined","title":"Do you like pizza?","values":{"2":{"value":"Yes","baseline":"checked"},"3":{"value":"No","baseline":"undefined"}}},{"cssClass":"select","required":"checked","multiple":"checked","title":"Select a pizza type:","values":{"2":{"value":"Margherita","baseline":"checked"},"3":{"value":"Napoli","baseline":"undefined"},"4":{"value":"Marinara","baseline":"undefined"}}}]

How could I do?

I don’t succeed in parsing the keys, grouping the elements which do part of the same JSONObject.

  • 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-06T02:39:32+00:00Added an answer on June 6, 2026 at 2:39 am

    I resolved by parsing the keys and by building the JSONObjects with the use of two temporary hashtables.

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

Sidebar

Related Questions

Java Docs says that, putIfAbsent is equivalent to if (!map.containsKey(key)) return map.put(key, value); else
Java Concurrency in Practice gives the following example of an unsafe class which due
java.lang.NoClassDefFoundError: javax/servlet/jsp/el/ELException from using <c:set var=testVar value=testVal /> All other JSTL tags work. jsp
Java is the key here. I need to be able to delete files but
Java 7 is supposed to fix an old problem with unpacking zip archives with
JAVA : is there a difference between the two references p && pp? PrintStream
Java allows for certain keywords to be followed by a statement or a statement
Java noob question: Consider the following C array and initializer code: struct { int
Java Internationalization Rules . It says to replace s1.compareTo(s)==0 with Collator.compare(s1,s2)<0 why <0 ?
Java doesn't support multiple inheritance for abstract classes, but I'm trying to do the

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.