What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-10-19 11:55:16
typescript iterate over interface
class Activity { public id: string = ''; public title: string = ''; public body: string = '' ; public json: Object = {}; } let activity = new Activity() const headers: Array<Object> = Object.keys(Activity).map(key => { retur... Add solution -
Javascript 2021-10-19 11:13:08
javascript foreach array of object get value by key
var lunch = { sandwich: 'ham', snack: 'chips', drink: 'soda', desert: 'cookie', guests: 3, alcohol: false, }; Object.keys(lunch).forEach(function (item) { console.log(item); // key console.log(lunch[item]); // value }); // returns "sandwich... Add solution