Extracting Data retrieved from an API using JavaScript

preview_player
Показать описание
To extract data retrieved from an API first implement a GET request through JavaScript's fetch function to a desired API endpoint.

In our example our endpoint is /posts

Once the data is brought into your local application use an indexed bracket notation "[0]" to access the desired post.

If access to the post has been achieved, then use the dot operator "." to extract the "body" property.

Accordingly, the data value will be accessible to be used throughout the application. In this specific use case, we render the data on to the user interface.

If you need a refresher on how a GET request works check out the link below:

Best,

Fido

-----------------------------------------------------------------------------------------
Follow me on instagram 📸 : @selftaughthustle
*/
Комментарии
Автор

Another genius is here. Thank you so much

samuelOmaiye
join shbcf.ru