0

I'm trying to build an app that gives the user random quotes. To get the quotes I'm using an API, from https://animechan.vercel.app/guide#quotes-by-anime. When I call

fetch('https://animechan.vercel.app/api/random')
        .then(response => response.json())
        .then(quote => console.log(quote))

It logs in the console the follow:

Object {
  "anime": "Kuroko No Basket",
  "character": "Kuroko No Basket",
  "quote": "No matter how hard you practice, \"someday\" and \"maybe\" aren't good enough. I need to know if you have ambitious goals and the will to accomplish them."
}

Is there a way to get anime, character, and quote in different variables, so that I can manipulate inside my code?

cedoispir
  • 11
  • 2

0 Answers0