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
Tijo Johnson C
NA
136
9.3k
How to format json data to array format.
Dec 21 2019 2:44 AM
How to format json data to array format and nested arrays are in object like {} without square brackets in typscript.
Now return data as :
{
"ProductID": 1,
"Category": [{
"CategoryID": 1,
"SubCategory": [{
"SubCategoryID": 1,
}]
}]
}
I want converted output data as in typescript:
[{
"ProductID": 1,
"Category": {
"CategoryID": 1,
"SubCategory": {
"SubCategoryID": 1,
}
}
}]
I have tried
return this.restApi.getProductBin().subscribe((data: {}) => {
const usersJson: any[] = Array.of(data);
})
Reply
Answers (
3
)
Angular-CLI proxy to spring boot backend doesn't work
How to fill marker by result of latitude and longitude from