delimiter $$ create function get_from_serialized_json ( in_string varchar(255), in_key varchar(255) ) returns varchar(255) BEGIN return trim( '"' from substring_index( substring_index( substring(trim("}" FROM in_string ), locate(concat("\"",in_key,"\""), in_string )+1 ) , ";",2 ), ":",-1 )) ; END$$