sh/jshn.sh: add json_for_each_item()
authorHans Dedecker <dedeckeh@gmail.com>
Thu, 1 Feb 2018 15:41:27 +0000 (16:41 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 8 Feb 2018 11:15:20 +0000 (12:15 +0100)
commitbb0c830b2a259b7c5ffa7c309ce9d3004f3c41a1
tree2b671181001077cc516583742281bc0bb4ed1189
parent9c4aeda96220b3f0d097d153bedd328f71f382bf
sh/jshn.sh: add json_for_each_item()

Function usefull to iterate through the different elements of an
array or object; the provided callback function is called for each
element which is passed the value, key and user provided arguments.
For field types different from array or object the callback is called
with the retrieved value.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Acked-by: Jo-Philipp Wich <jo@mein.io>
sh/jshn.sh