From e348b1fa88823ddb18fb8d2a2d1acea94c9f9448 Mon Sep 17 00:00:00 2001 From: "Juan A. Suarez Romero" Date: Fri, 11 Jan 2013 15:03:08 +0000 Subject: path: Fix get all array elements with wildcard Using the same data as in tests, asking for $['store']['book'][*] JSON path should return all the book objects in an array. But that array is returned inside another array, dupped several times. https://bugzilla.gnome.org/show_bug.cgi?id=691557 --- json-glib/json-path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'json-glib/json-path.c') diff --git a/json-glib/json-path.c b/json-glib/json-path.c index 350fab3..fc8d52c 100644 --- a/json-glib/json-path.c +++ b/json-glib/json-path.c @@ -879,7 +879,7 @@ walk_path_node (GList *path, else { JSON_NOTE (PATH, "glob match element '%d'", i); - json_array_add_element (results, json_node_copy (root)); + json_array_add_element (results, json_node_copy (element)); } } g_list_free (elements); -- cgit v1.2.1