Float value from html sent to jsonify

Asked 1 years ago, Updated 1 years ago, 306 views

Data received from flask server

I don't know how to float the data sent in this json form in HTml.

What should I do?

<script>
    function Data(){
        var data = JSON.parse(data);
        document.getElementById("data").innerHTML = "data";
    }
</script>

I'm trying to make it look like this.

html json

2022-10-08 01:00

1 Answers

document.getElementById("data").innerText = JSON.stringify(data);


2022-10-08 01:00

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.