{"action":"created","issue":{"url":"https://api.github.com/repos/bblanchon/ArduinoJson/issues/341","repository_url":"https://api.github.com/repos/bblanchon/ArduinoJson","labels_url":"https://api.github.com/repos/bblanchon/ArduinoJson/issues/341/labels{/name}","comments_url":"https://api.github.com/repos/bblanchon/ArduinoJson/issues/341/comments","events_url":"https://api.github.com/repos/bblanchon/ArduinoJson/issues/341/events","html_url":"https://github.com/bblanchon/ArduinoJson/issues/341","id":173632158,"number":341,"title":"Support for querying location","user":{"login":"devinrayolsen","id":553928,"avatar_url":"https://avatars.githubusercontent.com/u/553928?v=3","gravatar_id":"","url":"https://api.github.com/users/devinrayolsen","html_url":"https://github.com/devinrayolsen","followers_url":"https://api.github.com/users/devinrayolsen/followers","following_url":"https://api.github.com/users/devinrayolsen/following{/other_user}","gists_url":"https://api.github.com/users/devinrayolsen/gists{/gist_id}","starred_url":"https://api.github.com/users/devinrayolsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devinrayolsen/subscriptions","organizations_url":"https://api.github.com/users/devinrayolsen/orgs","repos_url":"https://api.github.com/users/devinrayolsen/repos","events_url":"https://api.github.com/users/devinrayolsen/events{/privacy}","received_events_url":"https://api.github.com/users/devinrayolsen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bblanchon/ArduinoJson/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-28T06:29:36Z","updated_at":"2016-08-28T16:25:51Z","closed_at":null,"body":"First let me say how much I love this lib!! I'm using it to both build an menu system for my LCD and system variables that all gets saved and loaded from SD card (Ardunio Mega R3).\r\n\r\nThat said, when working with complex nested objects (10 wide / 4 levels deep) it would be greatly helpful to be able to have a way to quickly reference back to a location within a complex object. For instance, in my use case I touch(read) an object then list it's contents to my LCD. Using a global int (currentMenuIndex) and a scroll function, I can scroll through an objects subobjects. However, when it comes time to then move into one of these sub objects and read it's contents, it requires me to know the full path back to this newly touched object, so on and so forth.\r\n\r\nI've tried keeping a global JsonObject (I know I know local local local) as a storing location (and as a pointer) for where I currently am at within my complex object, but as you are aware, you can't re-assign one JsonObject to another like that.\r\n\r\nI've also tried to keep an array of strings that contains the name of each object I've touched (like a history) so that I could use that array's items as a way to get back to my current location a complex object.. Alas I know of no way to dynamically use X number of brackets[] that contain X number of history names (reflection if you will) to get me back to my current location.\r\n\r\nIs there already a way I'm just not aware of? and if not, might I purpose something like the following?\r\n\r\nSay we have a 4 level deep nesting of objects:\r\n```\r\nJsonObject& root = jsonBuffer.createObject();\r\n\tJsonObject& lvlOne = root.createObject(\"level one\"); \r\n\r\n\t    JsonObject& lvlTwo = lvlOne.createObject(\"level two\");\r\n\r\n\t        JsonObject& lvlThree = lvlTwo.createObject(\"level three\");\r\n\r\n\t            JsonObject& lvlFour = lvlThree.createObject(\"level four\");\r\n```\r\nInstead of getting to lvlFour by:\r\n`root[\"level one\"][\"level two\"][\"level three\"][\"level four\"]`\r\n\r\nit would be simply amazing to be able query our way back to a location via again a self maintained history string array by that which we concat and then pass our self like so:\r\n\r\n`root.queryObject(\"level one/level two/level three/level four\");`\r\nand even\r\n`root.queryArray(\"level one/level two/level three/level four\");`\r\n\r\nPossible?\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/bblanchon/ArduinoJson/issues/comments/242983821","html_url":"https://github.com/bblanchon/ArduinoJson/issues/341#issuecomment-242983821","issue_url":"https://api.github.com/repos/bblanchon/ArduinoJson/issues/341","id":242983821,"user":{"login":"devinrayolsen","id":553928,"avatar_url":"https://avatars.githubusercontent.com/u/553928?v=3","gravatar_id":"","url":"https://api.github.com/users/devinrayolsen","html_url":"https://github.com/devinrayolsen","followers_url":"https://api.github.com/users/devinrayolsen/followers","following_url":"https://api.github.com/users/devinrayolsen/following{/other_user}","gists_url":"https://api.github.com/users/devinrayolsen/gists{/gist_id}","starred_url":"https://api.github.com/users/devinrayolsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devinrayolsen/subscriptions","organizations_url":"https://api.github.com/users/devinrayolsen/orgs","repos_url":"https://api.github.com/users/devinrayolsen/repos","events_url":"https://api.github.com/users/devinrayolsen/events{/privacy}","received_events_url":"https://api.github.com/users/devinrayolsen/received_events","type":"User","site_admin":false},"created_at":"2016-08-28T16:25:51Z","updated_at":"2016-08-28T16:25:51Z","body":"Ah, yes thank you for the snip, I missed that! That's a huge help!\r\n\r\nAs for the rest, 110% in agreement I'm using this in an unorthodox approach. Its just the draw to being able to wrap all my app's settings and objects into a single string, save it on my MicroSD and load it back up with ease in say the case of a power outage or even saving unique versions of said apps settings. You've built something really awesome here!\r\n\r\nThanks for the quick reply; my request above seems silly now that I know the above snip!"}}
{"actor":{"display_login":"devinrayolsen"}}