The only legal way is :

 if ('undefined' === typeof JSON)
            $.getScript("http://www.json.org/json2.js";, proceed );

function proceed ()
{
var obj = JSON.parse(
'[{"carePacks":[{"businessCode":"J1PS","description":"HP
1"}],"coveragePeriod":12},{"carePacks":
[{"businessCode":"J1PS","description":"HPs"}],"coveragePeriod":13}]'
)
}


-- DBJ



On Apr 27, 9:13 am, gaohk <cnga...@gmail.com> wrote:
> I have a string that is like [{"carePacks":
> [{"businessCode":"J1PS","description":"HP 1"}],"coveragePeriod":12},
> {"carePacks":[{"businessCode":"J1PS","description":"HP
> s"}],"coveragePeriod":13}].
> can you give me some advice on how to convert it to a json structure,
> and how to get data from the data structure, like get "HP 1".
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to