Avatar of Jimbo99999
Jimbo99999
Flag for United States of America

asked on 

Formatting JSON Data

Good Day Experts!

I am working on one of my node/express/sequelize/mysql projects and not sure how to format some JSON data.  The data is returned to my js file and I am displaying it in a modal form.  The data is displaying in the modal format but my date(with no time) is coming form the db and not displaying how I want it to.  

I am looping through the JSON and here is the line of code I am using to display the date:
 $("#modal-data").append("<p><b>Payment Type:</b> " + data[i].paymentType + "</p>");

Here is how it is displaying:
2019-11-24T00:00:00.000Z

I have been unable to find a solution to achieve the date with nothing after it.  Can you help point me in the right direction?

Thanks,
jimbo99999
JavaScriptJSON

Avatar of undefined
Last Comment
Julian Hansen

8/22/2022 - Mon