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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:41:51+00:00 2026-05-15T16:41:51+00:00

Hi I am trying to post an array of javascript objects back to the

  • 0

Hi I am trying to post an array of javascript objects back to the server, using dojo.

I have an array of data that is like appears like this:

var elements = [
  myobj = {id:"1", name:"myname", title:"mytitle"},
  myobj = {id:"2", name:"myname2", title:"mytitle2"}
] 

I want to post this as a json string back to the server to be handled by a PHP script. However dojo.toJson will only seralise an individual object.

How can I convert the entire array of objects into a json string that can be posted to the backend for processing?

many thanks

  • 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-15T16:41:52+00:00Added an answer on May 15, 2026 at 4:41 pm

    You are misinformed: dojo.toJson() handles arrays without a problem. I just plugged in your elements and that’s what I’ve got:

    [{"id":"1","name":"myname","title":"mytitle"},{"id":"2","name":"myname2","title":"mytitle2"}]
    

    Looks okay to me.

    But maybe I misunderstood something? Please post a sample proving your point.

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

Sidebar

Ask A Question

Stats

  • Questions 539k
  • Answers 539k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Maybe this will help you a bit: Unfortunately the current… May 17, 2026 at 2:20 am
  • Editorial Team
    Editorial Team added an answer 1). Hide the table when resizing. 2). Froze layout processing… May 17, 2026 at 2:20 am
  • Editorial Team
    Editorial Team added an answer Never mind, I figured it out. The symbol that indicates… May 17, 2026 at 2:20 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Lets say I have an array of javascript objects, and I am trying to
I'm trying to parse the rows in a table that I generate using Javascript
I'm trying to post a JavaScript data object with the following: $.post(frm.attr(action), data, function(res)
I am having an issue trying to post a JSON string using dojo.xhrPost to
I'm trying to validate some POST data. One of the validations I need to
I'm trying to post via curl, I've been using the same code over and
I'm trying to pass a JavaScript object to a PHP script through jquery.ajax() ,
I have an array: myarr = []; I'm filling it with some values: myarray['name']
So I'm trying to complete some javascript and having trouble codeing links to update
I am trying to create a drop down list using jQuery, PHP and mySQL,

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.