js dictionary keys code example
Example 1: get keys of dictionary js
let dict = { a:1 , b:2 , c:3 }
console.log( Object.keys(dict) )
Example 2: dictionary in javascript
let myDictionary = {
"value 1": "string",
"value 2": 2,
"value 3": ["array value 1", "array value 2"]
};
var value1 = myDictionary["value1"];
var value2 = myDictionary["value2"];
var value3 = myDictionary["value3"];
Example 3: get all keys of object in javascript
myObject = {
"key": "value",
"key2":"value2"
}
Object.keys(myObject);
Example 4: js dictionary
var dict = {
FirstName: "Chris",
"one": 1,
1: "some value"
};