access each Object's key/value pairs at each index within the Array. code example
Example 1: javascript iterate object key values
Object.entries(obj).forEach(([key, value]) => {
console.log(key, value);
});
Example 2: javascript iterate over object keys and values
const object1 = {
a: 'somestring',
b: 42
};
for (let [key, value] of Object.entries(object1)) {
console.log(`${key}: ${value}`);
}
Example 3: create dictionary swift
var someDict:[String:Int] = ["One":1, "Two":2, "Three":3]
var someVar = someDict["One"]
print("The value of key = One is \(someVar)")