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

sql - MySQL - Finding Empty relations -

unity3d - Rotate an object to face an opposite direction -

Upload file with tags through OwnCloud or NextCloud API -