Random Quote: how do i filter the data from api i am getting too many things here

I am working on Random Api some what got response from API but it shows many details how to get this quote only, please help here is my codepen

I get an https mixed content error when I try it, but that is not unusual when practicing APIs with CodePen - it has not been a great platform for it.

What I would suggest is grabbing a browser extension that helps with processing JSON formats. I use one called JSONView for Chrome - it has been brilliant for me as I can see what the keys are for the JSON object and how to specifically call the information I want.

I hope that this is helpful. The AJAX calls have been some of the most difficult content to get through for me so far, so I sympathise.

1 Like

If you are saying what I think you are saying,
you can reference certain properties of a JSON readout, or javascript object, with dot notation or bracket notation. If you had object x for example:

var x =  {
"prop1": "bagels",
"prop2" : "strawberries",
"prop3" : "chevrolet"

Now, I can get any of the text behind the colons by referencing the property of the object before the colons. For example, if I wanted to return “bagels” I could reference it as such:




I hope this helps.

Thanks all finally i got Random Quote machine work.