I am requesting values over API. Something like this: array = [{'value': 4.3}, ...]. These numbers are shown correctly also in the debug mode and in console.log output or in API response.
I am using then this code in the front end:
<tr>
<th scope="col"></th>
<td scope="col" v-for="(value, key) in array">
<span> {{ value }}</span>
</td>
</tr>
I see "4.3" after rendering.
But if I change it like this:
<tr>
<th scope="col"></th>
<td scope="col" v-for="(value, key) in aindex_array">
<span> {{ 6 - value }}</span>
</td>
</tr>
I see "1.7000000000000002" after rendering.
Same if I use "6.0".
Strange thing, it happens not with all number but only some of them. What is this and how can I avoid it?
In case it is relevant: On the backend side of the API are Gunicorn and Flask.