DEV Community

Glad Chinda
Glad Chinda

Posted on

JSON Collection to CSV

The code pen you are about to see was originally created as part of an article I published on the LogRocket blog.

Here is a breakdown of what the code pen is about:

  • Fetch an array collection of JSON objects from an API (photos from the Picsum Photos API).
  • Filter the photos based on image type and dimensions.
  • Extract selected fields from each photo item in the array collection.
  • Reformat the extracted data as CSV (comma-separated values) string
  • Download the generated CSV file on the browser.

The goal is to do all the operations listed above using just Web APIs.

Show some love ❤️

  • Like this post
  • Comment your feedback
  • Share with someone
  • Follow me on Twitter

Top comments (0)