Yii Framework Forum: [Carjson] Parse Json With Jquery - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Carjson] Parse Json With Jquery Rate Topic: -----

#1 User is offline   kfahmi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 81
  • Joined: 19-March 12

Posted 01 November 2013 - 01:50 AM

Extension Work nicely.. the output (JSON) comes up like this :


[
{"attributes":{"id_tp":"199","id_posttag":"164","id_usertag":"29","id_group":null,"new":"1"},"relations":{"idPost":{"id_post":"164","notes":"asdsad"}}},
]



But...I have a problem when im using JQuery to parse this JSON (output).

that output shows up like this :

[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]


is there anybody can help me??how using the jquery code to get this JSON and parse it?

this is my code that use for parse the JSON

$(document).ready(function()
{
var session = window.localStorage.getItem('example');
var obj = jQuery.parseJSON(session);
var idnya = obj.id_user;
$.get("http://192.168.12.3/leapdeck.com/android/posting/tagpost",
{
idUser:idnya
},

function(data,status)
{ 
var tagpost = data;                                                                                var tag = jQuery.parseJSON(tagpost);                                                                                            alert(tag);
});
});



Thanks for helping me anyway :)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users