C utility functions for OpenWRT libraries
592f2dbd82
When traversing arrays of tables or arrays of array it is required to call json_select # where # is the index of the array item to select. Internally json_select() calls json_get_var() to obtain the correct prefix to populate $JSON_CUR with. However, the "tr" call in json_get_var() incorrectly replaces all digits with underscores, making any lookup for numeric array items fail. The attached patch changes the "tr" expression to allow digits and thus implements the expected behaviour for nested arrays. |
||
---|---|---|
examples | ||
sh | ||
.gitignore | ||
avl.c | ||
avl.h | ||
blob.c | ||
blob.h | ||
blobmsg.c | ||
blobmsg.h | ||
blobmsg_json.c | ||
blobmsg_json.h | ||
CMakeLists.txt | ||
jshn.c | ||
list.h | ||
list_compat.h | ||
uapi.h | ||
ulog.h | ||
uloop.c | ||
uloop.h | ||
usock.c | ||
usock.h |