The string is being returned correctly but it contains a comma at the end of the string which I need to get rid of as it is interfering with the pdf file name.
Problem is that the replace with a space doesnt seem to remove the comma.
Did you cross check tinyDB value first? Can you share the value with us? URL value in browser is ok but we need to know what kind of value stored in tinyDB