I am a beginner of JavaScript and want to display an array of objects in HTML.
The format of the data is like this:
[
{key:apple,value:1.90},
{key:berry,value:1.7},
{key:banana,value:1.5},
{key:cherry,value:1.2}
]
I want to use a list with three columns (id, name, relevance) to display them. And the id can increase from 1 automatically.
Could anyone tell me how to write a javascript code to display it?
Please give me some materials or examples to learn.