
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 05, 2022 04:38 PM
I’m a total newbie to JavaScript, and pretty proud of myself that I’ve figured out how to connect to my company’s API to get store information.
console.log(await storeInfo.json());
is displaying all of the JSON returned from the API call, but now how do I get that data out of the JSON?
Example:
CONSOLE.LOG
- :arrow_forward: (1) [Object]
-
:arrow_forward: 0: Object
1. StoreNumber: “1234”
2. StoreName: “Joe’s Market”
3. :arrow_forward: StorePhoneNumbers: Array(2)- :arrow_forward: 0: Object
- Description: “Fax”
- PhoneNumber: “800-555-1212”
- :arrow_forward: 1: Object
- Description: “Landline”
- PhoneNumber: “800-555-2121”
How can I pull the store name and phone numbers out into individual variables that I can do stuff with?
10 Replies 10

Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 06, 2022 11:41 AM
Congrats! :tada:
Looks like the top level of the data is an array, versus an object. It was hard to tell in your initial post. Glad you figured it out.

- « Previous
-
- 1
- 2
- Next »