Adjusted find_json_token() to work with arrays