retrieve notes from database and print as json.String