I have an object like this:
var currencyTypes = { NOK: {value:1.00000, name: "Norske kroner", denomination: "kr" }, EUR: {value:0.10733, name: "Europeiske euro", denomination: "€" }, USD: {value:0.12652, name: "United States dollar", denomination: "$" }, GBP: {value:0.09550, name: "Pound sterling", denomination: "£" }, }; And I have found a way to list all the key objects:
var keyVal = []; for(var v in currencyTypes) keyVal.push(v); "There are " + keyVal.length + " different currencies here: " + keyVal This lists all the currencyTypes: NOK,EUR, USD, GBP
But how can I print a list with key, value, name, denominations? I tried keyVal.properties but that didn’t work. I've tried to search for a solution here, but haven't found anything. What I want is an output that looks something like this:
NOK, Norske kroner, 1 kr EUR, European euros, 0.10733 € and so on