Friday, 6 September 2013

Serialize the data from 3rd party API in javascript/jQuery

Serialize the data from 3rd party API in javascript/jQuery

I want to do a serialize the data that I got from 3rd Party API. The
following Picture is what I got from the API

As you can see in the photo, I have received 2 sets of the Information
which indicated by the number in the []. And when I do the POST request
using jQuery, the multiple Parameters Posts to my Java method. What I
would like to do is to encapsulate each set ot the Information into a
Group and after that serialize them in one parameter and sent it back as
one object that hold all the things inside. How can I do it by Javascrip
or jQuery???
anyway, this is my code
function getMediaInfo(InkBlob){
console.log(InkBlob);
jQuery.ajax({
type: 'POST',
url: '/webapp/filepicker/importAssets',
dataType: 'json',
data: {"inkBlob": InkBlob}
}); }
All I want to do is to set only one parameter call inkBlob that contains
the Information as Show in the photo above.

No comments:

Post a Comment