java - How to extract nested JSON Elements in Liferay -


i'm using liferay 6.2 , have jsonobject containing following:

{   "foo":{          "bar":{                 "baz":["42","23"]                }         } } 

i have string containing path/selector/whatsitcalled pointing somewhere in jsonobject: foo.bar.baz[0]

how go getting corresponding value jsonobject, i.e. "42"?

all methods find deal next level down, nothing seems cover nesting. parse path manually, isn't there easier way?

use java library perform xpath similar query json. i've used success in liferay.

https://github.com/jayway/jsonpath


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -