[misc] Change json_drilldown to _select and fix error case

This commit is contained in:
ejurgensen
2020-02-16 21:29:43 +01:00
parent 70f0ff1f61
commit 18cf2dbbbf
3 changed files with 7 additions and 6 deletions

View File

@@ -33,11 +33,12 @@
#include "logger.h"
json_object *
jparse_drilldown(json_object *haystack, const char *keys[])
jparse_select(json_object *haystack, const char *keys[])
{
json_object *needle;
json_bool found;
needle = NULL;
while (*keys)
{
found = json_object_object_get_ex(haystack, *keys, &needle);