I'm using an API (https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp&jsonp=?
) that gets me this object (a random quote with author):
?({"quoteText":"Life is so constructed that an event does not, cannot, will not, match the expectation. ","quoteAuthor":"Charlotte Bronte","senderName":"","senderLink":"","quoteLink":"http://forismatic.com/en/16af75b8b4/"})
How would I be able to isolate Life is so constructed that an event does not, cannot, will not, match the expectation.
from "quoteText":
and place it somewhere in my HTML code.
Same thing with isolating: Charlotte Bronte
from "quoteAuthor":
and placing it somewhere in my HTML code. Bonus points, sometimes the "quoteAuthor":
field is left blank, not sure what to do when that happens.
I know how to place this entire JSON object in my HTML code, I just need some help isolating certain parts of the JSON object, and placing them separately.
Any help would be deeply appreciated!