Finance App Help

Hello Everyone,
I need to use the yahoo finance api and i can’t get it to work.
Please Help Here Is My Code.


And here is an example api address : https://query1.finance.yahoo.com/v7/finance/quote?lang=en-US&region=US&corsDomain=finance.yahoo.com&symbols=AAPL

1 Like

an you explain what are you getting?

Is not descriptive enough.

1 Like

If you copy and paste the JSON response text from a browser window into Best JSON Viewer and JSON Beautifier Online and click Tree Viewer, you’ll see the data formatted in an easy-to-read way.

Then, if you click on a property name such as “displayName”, you’ll see the path to that property at the top of the window:

In this case, it’s object > quoteResponse > result > 0 > displayName.

So you would need to convert the JSON to an object, as you’ve done with the green response block above and then for the get property text string, you would want to use this:

quoteResponse.result[1].displayName

The [1] represents the first array item in the “result” JSON property. JSON numbers the first item in an array/list zero (0) but Thunkable lists start with 1 which is why the property name has a 1 instead of a 0.

To learn more about how to parse JSON, see my tutorial.

2 Likes

Thanks for the help :sweat_smile: