Skip to content

Instantly share code, notes, and snippets.

@ro-savage
Created September 9, 2017 07:32
Show Gist options
  • Select an option

  • Save ro-savage/99dece39bf4348a68c9e543f95f1810c to your computer and use it in GitHub Desktop.

Select an option

Save ro-savage/99dece39bf4348a68c9e543f95f1810c to your computer and use it in GitHub Desktop.
// Get data from https://jsonplaceholder.typicode.com/posts
const examplePostsData = [
{
"userId": 1,
"id": 1,
"title": "Some crazy title",
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
},
{
"userId": 2,
"id": 2,
"title": "Another stupid title",
"body": "est rerum tempore vitae\nsequi sint nihil reprehenderit dolor beatae ea dolores neque\nfugiat blanditiis voluptate porro vel nihil molestiae ut reiciendis\nqui aperiam non debitis possimus qui neque nisi nulla"
},
{
"userId": 1,
"id": 3,
"title": "Third title",
"body": "eos qui et ipsum ipsam suscipit aut\nsed omnis non odio\nexpedita earum mollitia molestiae aut atque rem suscipit\nnam impedit esse"
},
]
// Get post 3
// Get all posts by userId 1
// Get a list of titles
// Get data from https://jsonplaceholder.typicode.com/users
// Get list of all people who live in the cities of 'Wisokyburgh' or 'Roscoeview'
// create a new array, that has all the posts but now includes the name and email of the user
// get a list of posts by the person with the email 'incere@april.biz'
// Get data from https://jsonplaceholder.typicode.com/todos
// Count the number of completed todos
// Create an object that has the completed todos and uncomplete todos { completed: [], uncompleted: [] }
// Crate an object that has the users username, and then a object with their completed and incompleted todos
// { Antonette: { completed: [], uncompleted: [] }
// Count the number of completed and uncompleted todos by the user who lives in the city 'Wisokyburgh'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment