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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:19:05+00:00 2026-05-30T12:19:05+00:00

I am using $.ajax function to send json data to serverside function. var jsonObjects

  • 0

I am using $.ajax function to send json data to serverside function.

var jsonObjects = [{id:1, name:"amit"}, {id:2, name:"ankit"},{id:3,name:"atin"},{id:1, name:"puneet"}];

$.ajax({
     url: "{{=URL('myControllerName')}}",
     type: "POST",
     context: document.body,
     data: {students: JSON.stringify(jsonObjects) },
     dataType: "json",
     success: function(){
         alert('ok');
  }

});

In the serverside function, how do I access the data?

Somebody has give the code for grails as :—

//this code is written in grails
import grails.converters.JSON;
List<JSON> students = JSON.parse(params.students) //students in request params is parsed to json objects and stored in the List
println "Student id: " + students[0].studentId    //first element of the students list is accessed as a map holding a key studentId

I want to do this in a python web framework viz. web2py.

Tried to access it as params.students and request.students, but no luck.

What is the correct syntax to access the data sent? (I checked the jQuery API, but couldn’t find the same).

Thanks,

Vineet

  • 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-30T12:19:06+00:00Added an answer on May 30, 2026 at 12:19 pm

    You are confused.

    “How to access the data on the serverside” has nothing to do with jquery, and everything to do with your server-side web framework.

    You need to extract the data from the request object; the web2py documentation for that is here: http://web2py.com/book/default/chapter/04#request

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

Sidebar

Related Questions

I'm trying to send the node instance JSON data using an ajax get request
I'm using the JQuery AJAX function to deliver data to a PHP doc. Currently,
I send data from javascript to PHP like this: $.ajax({'url': 'my.php', 'type': 'POST', 'data':
what im trying to do is to send data in JSON using jquery to
By using jquery ajax function, I can do something like: $.ajax({ url: url, type:
I obtained the data from the server using ajax like this: (EDITED) $(document).ready(function() {
I am using jQuery.ajax(...) to retrieve JSON data from an ASP.NET MVC service. When
I have some content from server using $.ajax() function. I try to replace some
How to pass multiple checkboxes using jQuery ajax post this is the ajax function
I am using the $.ajax function in jquery to make a call to an

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.