xpath BUGFIX inherit module for JSON node names
diff --git a/src/xpath.c b/src/xpath.c
index 7b91191..88403a0 100644
--- a/src/xpath.c
+++ b/src/xpath.c
@@ -7130,6 +7130,12 @@
         LY_CHECK_GOTO(rc = lydict_insert(set->ctx, ncname, ncname_len, &ncname_dict), cleanup);
     }
 
+    if ((set->format == LY_PREF_JSON) && no_prefix) {
+        /* do not set moveto_mod if there is no explicit prefix for JSON, it should be inherited from
+         * the specific context node */
+        moveto_mod = NULL;
+    }
+
 moveto:
     /* move to the attribute(s), data node(s), or schema node(s) */
     if (attr_axis) {