Given an end point URL to fetch all the posts
and comments
. Do the following.
- Map all the comments to the posts it belongs to. The resultant data after mapping should be of below structure.
{
postId: [commentId, commentId]
}
Created with CodeSandbox
https://codesandbox.io/s/github/devAbhijeet/cure-fit-interview-challenge
Given an end point URL to fetch all the posts
and comments
. Do the following.
{
postId: [commentId, commentId]
}
Created with CodeSandbox
https://codesandbox.io/s/github/devAbhijeet/cure-fit-interview-challenge