You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by rakesh kothari <rk...@hotmail.com> on 2010/10/07 19:56:16 UTC

RE: Accessing Nested Json

Thanks Alan. That works!

-Rakesh

> From: gates@yahoo-inc.com
> To: pig-user@hadoop.apache.org
> Subject: Re: Accessing Nested Json
> Date: Wed, 29 Sep 2010 13:53:42 -0700
> 
> Are you loading them as tuples or maps?  If you're loading them as  
> tuples than you should be able to say x.keyA.pA (which should return  
> "vA").  If you're loading them as maps than it would be x#'keyA'#'pA'
> 
> Alan.
> 
> On Sep 28, 2010, at 12:45 PM, rakesh kothari wrote:
> 
> >
> > Hi,
> >
> > Is there a good way to access nested properties that are multilevel  
> > deep from Json objects loaded in Pig ?
> >
> > For example, if my json is like:
> >
> > {"keyA":{"pA":"vA"}} and I need to access "pA".
> >
> > Thanks,
> > -Rakesh
> > 		 	   		
>