java - how can I access the string array stored in jcr node? -
in jcr node have key subpage
, holds value of type string[]
:
{"title":"some title1", "url":"some url1"} {"title":"some title2", "url":"some url2"} {"title":"some title3", "url":"some url3"} {"title":"some title4", "url":"some url4"}
how can access in java?
i tried:
valuemap contentvaluemap = resource.getvaluemap(); string subpages = contentvaluemap.get("subpage", string.class); system.out.println(subpages);
but prints first string:
{"title":"some title1", "url":"some url1"}
how can reach rest of them?
this should work-
string[] subpages = contentvaluemap.get("subpage", string[].class);
Comments
Post a Comment