Here are your problems... I'll remove the bulk of the data to make it more

rsJson: {[{...}]}

what you have is illegal. You're essentially saying you have an anonymous
object with not properties and filling it with an array (that's probably not
even totally accurate)... the bottom line is, you can't have a curly brace
immediately followed by a square brace. And going further you have it all
just sitting in a property floating in space. The first thing you need to do
is wrap the property in curlies so you're actually returning an object...

{rsJson: ...}

Now, this other issue of putting a square bracket right inside a curly...
You can either a) remove the outer curlies and just make rsJson be an array,
or b) add a property name which then becomes the array.

{rsJson: [{}, {}, ...]}

{rsJson: {myArray: [...]}}

On Wed, Dec 17, 2008 at 9:53 AM, jason maina <> wrote:

> Hi all,
> Below is JSON encoded(php) data. After evaluating and sanitizing it im not
> capable of extracting its contents im just not sure what im doing wrong:
> [php output]
> rsJson:{[{"groupCode":"1","groupName":"Roses","flowers":[{"flowerCode":"15","flowerName":"Roses"}]},
> {"groupCode":"2","groupName":"Carnations","flowers":[{"flowerCode":"16","flowerName":"Spray
> Carnations"
> },{"flowerCode":"17","flowerName":"Standard
> Carnations"}]},{"groupCode":"3","groupName":"Perennials"
> ,"flowers":[{"flowerCode":"2","flowerName":"Aster"},{"flowerCode":"3","flowerName":"Alstromeria"},{"flowerCode"
> :"10","flowerName":"Gysophila"},{"flowerCode":"12","flowerName":"Limonium
> Perezzi"}]},{"groupCode":"4"
> ,"groupName":"Annuals","flowers":[{"flowerCode":"1","flowerName":"Ammi
> Majus"},{"flowerCode":"4","flowerName"
> :"Bupleurum"},{"flowerCode":"5","flowerName":"Carthamus"},{"flowerCode":"6","flowerName":"Chinese
> Aster"
> },{"flowerCode":"7","flowerName":"Chrysantemum"},{"flowerCode":"8","flowerName":"Delphinium"},{"flowerCode"
> :"13","flowerName":"Lisianthus"},{"flowerCode":"14","flowerName":"Molucella"},{"flowerCode":"18","flowerName"
> :"Statice"},{"flowerCode":"19","flowerName":"Stocks"}]},{"groupCode":"5","groupName":"Bulbs","flowers"
> :[{"flowerCode":"9","flowerName":"Freesia"},{"flowerCode":"11","flowerName":"Lilies"}]}]}
> [php output]
> var jsonObj = res.responseText.evalJSON(true);
> alert(jsonObj);
> will not even popup, on firebug no errors showing up.
> Kind regards
> Jason
> >

Ryan Gahl
Nth Penguin, LLC
-- /
Future Home of the World's First Complete Web Platform
Inquire: 1-920-574-2218
LinkedIn Profile:

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to