Good0Provider Posted Tuesday at 04:27 PM Share Posted Tuesday at 04:27 PM (edited) I would like to use JContainers, but I can't figure how to get the keys for a nested map. For example, how to list all the keys for the map at ".dog". { "dog":{"name":bill","age":10} } I am looking for the function that would look like solveStrMapAllKeys(int object, String path). Edited Tuesday at 04:28 PM by Good0Provider Link to comment Share on other sites More sharing options...
PeterMartyr Posted yesterday at 03:48 AM Share Posted yesterday at 03:48 AM (edited) Create a while loop, but instead of using indices, use it like an list iterator: String function nextKey(Int object, String previousKey="", String endKey="") global native There more info in the source code, even an example on how to use it? EDIT some lite reading for you https://github.com/SilverIce/JContainers/wiki Edited yesterday at 03:53 AM by PeterMartyr added JC wiki Link to comment Share on other sites More sharing options...
xkkmEl Posted 18 hours ago Share Posted 18 hours ago JMap.allKeys( JMap.getObj( x, "dog")) 1 Link to comment Share on other sites More sharing options...
Good0Provider Posted 14 hours ago Author Share Posted 14 hours ago (edited) 13 hours ago, PeterMartyr said: Create a while loop, but instead of using indices, use it like an list iterator: String function nextKey(Int object, String previousKey="", String endKey="") global native There more info in the source code, even an example on how to use it? EDIT some lite reading for you https://github.com/SilverIce/JContainers/wiki Already read. Thanks. Also recommend: Edited 14 hours ago by Good0Provider Link to comment Share on other sites More sharing options...
Recommended Posts