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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:00:27+00:00 2026-06-14T20:00:27+00:00

I am using DOJO 1.8 iand spring mvc. I want to convert my form

  • 0

I am using DOJO 1.8 iand spring mvc. I want to convert my form fields to JSON objects and pass it to the controller. Using DOJO dom-form.toObject(“myForm1”) i am able to pass the Json to the controller if it is a simple object.

If my model object is having inner objects then the .toObject() is not able to convert that into nested JSON objects.

var formObject1 = domForm.toObject("myForm1");
    alert("hi");
    require(["dojo/json"], function(JSON){
        postData = JSON.stringify(formObject1);
    });

    dojo.byId("testdiv").innerHTML = postData;

and the Json I am getting is

{“firstName”:”12345″,”middleName”:”Joanna”,”lastName”:”Eliza”,”address.addrLine1″:”add1″,”address.addrLine2″:”add2″,”address.addrLine3″:”add3″,”email”:”12345″}

But I need as below,

{“firstName”:”12345″,”middleName”:”Joanna”,”lastName”:”Eliza”,“address”:{“addrLine1″:”add1″,”addrLine2″:”add2″,”addrLine3″:”add3”},”email”:”12345″}

Does DOJO support this type of JSON conversion?

  • 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-14T20:00:29+00:00Added an answer on June 14, 2026 at 8:00 pm

    Dojo has various method for this kind of task. Just look at the documentation and choose a suitable solution.

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

Sidebar

Related Questions

I am using Dojo Toolkit and I want form elements to serialize into array,
When I post a form using dojo.xhrPost , I get all the fields in
I'm using dojo's event delegation to connect a Tooltip widget to dynamically generated dom
Using a form in a dialog box I am using Dojo in jsp to
How to get a DOM using dojo by the tag name? I have a
I have an HTML form using dojo and have the following code for a
Using dojo.dnd, I want to allow a user to drag only one item at
i am using dojo toolkit with php codeigniter 2.1.0 and i want to put
I want to consume a Restful webservice using dojo . the result of the
I'm using Dojo 1.5 to create a dijit.form.Select with some data from a datastore.

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.