diff options
author | Juan A. Suarez Romero <jasuarez@igalia.com> | 2013-01-11 15:03:08 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2013-01-11 17:24:06 +0000 |
commit | e348b1fa88823ddb18fb8d2a2d1acea94c9f9448 (patch) | |
tree | c90cf7d9ac592205ade45ccede4ce038d2ba7396 /json-glib/json-path.c | |
parent | f33c209e0f895b52afae5742a72cfacf104116bc (diff) | |
download | json-glib-e348b1fa88823ddb18fb8d2a2d1acea94c9f9448.tar.gz |
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
Diffstat (limited to 'json-glib/json-path.c')
-rw-r--r-- | json-glib/json-path.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |