function res = download_userdata(setup_id) retrieved = webread( ... 'https://driver-observer.thi.de/retrieve_arbitrary_sql.php', ... 'sql', ['select userdata from setup where setup_id = ' num2str(setup_id) ';'], ... 'noheader', '1', 'auth', 'Qnb7jfeGZM', weboptions('ContentType', 'text')); % Get rid of leading and trailing " (relies on greedy .*) json = regexprep(retrieved, '^"(.*)"', '$1'); json = replace(json, '""', '"'); res = reshape(jsondecode(json), 14, 3); res{1, 3} = struct2table(res{1, 3},'AsArray',true); res{1, 3}.duration = milliseconds(res{1, 3}.duration); end