angular 6 key value pair getvalue example
<div *ngFor="let item of testObject | keyvalue">
Key: <b>{{item.key}}</b> and Value: <b>{{item.value}}</b>
</div>@Component({
selector: 'app-myview',
template: `<div *ngFor="let key of objectKeys(items)">{{key + ' : ' + items[key]}}</div>`
})
export class MyComponent {
objectKeys = Object.keys;
items = { keyOne: 'value 1', keyTwo: 'value 2', keyThree: 'value 3' };
constructor(){}
}
Also in JavaScript:
- javascript go to previous page
- vue js cdn
- download datepicker js
- javascript fastest loop
- jquery datatable draw false
- javascript use variable regex
- hello world in jsp
- string charAt array js
- declare array in javascript
- mocha test cases in node js example
- oauth2 spring boot react google example
- how to find all permutations of an array with javascript
- how to create scroll to top button in reactjs example code
- using if statements in javascript
- if in javascript
- jquery selector checked
- puppeteer js onblur
- unordered list in react native
- how to print NODE_PATH
- useref react
- online javascript compiler
- on enter key press react
- javascript check if element has class
- rotate a div using javascript