TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ahmed elbarbary
NA
1.6k
275.4k
how to compre between two object vertically
May 1 2020 5:15 PM
I work on angular 7 I have array of two object json inside app.component.ts
I need to compare between two object but i need to display compare vertically .
this link have json array and sample
code I try as below :
import { Component, OnInit }
from
'@angular/core'
;
@Component({
selector:
'my-app'
,
templateUrl:
'./app.component.html'
,
styleUrls: [
'./app.component.css'
]
})
export class AppComponent implements OnInit {
private ldapcaches = [
{
"id"
: 1,
"host"
:
"localhost"
,
"filesize"
: 73,
"fileage"
:
"2018-01-26 09:26:40"
},
{
"id"
: 2,
"host"
:
"localhost"
,
"filesize"
: 21,
"fileage"
:
"2018-01-26 09:26:32"
},
];
private originalCache =
null
;
constructor() {
}
ngOnInit() {
for
(let cache
of
this.ldapcaches) {
}
console.log(this.originalCache);
}
}
compare firstitem seconditem
host localhost localhost
filesize 73
21
fileage 2018-01-26 09:26:40
2018-01-26 09:26:32
so I need
How to display expected result vertically with colorized difference with red as above ?
what i write on app.component.html
and what i write on ng oninit ?
Reply
Answers (
3
)
How to show json data on this Image using angular 7 ?
How add nested loop to menu component without use table ?