parser json BUGFIX key detection

Fixes #2009
diff --git a/src/parser_json.c b/src/parser_json.c
index 9c5c6c7..2509723 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -385,8 +385,8 @@
 
             if (!is_attr && !prefix) {
                 for (i = 0; i < key_set.count; ++i) {
-                    snode = (const struct lysc_node *)key_set.objs[i];
-                    if (!ly_strncmp(snode->name, name, name_len)) {
+                    if (!ly_strncmp(key_set.snodes[i]->name, name, name_len)) {
+                        snode = key_set.snodes[i];
                         break;
                     }
                 }