troubleshooting Question

Formatting JSON Data

Avatar of Jimbo99999
Jimbo99999Flag for United States of America asked on
JavaScriptJSON
2 Comments1 Solution73 ViewsLast Modified:
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
ASKER CERTIFIED SOLUTION
leakim971
Multitechnician
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros