add macro for json_array_foreach() if not defined