Skip to main content

Effortlessly Generate JSON Arrays from Raw Data with GitHub Copilot

· One min read

When developing my WindR application, I frequently encounter the task of adding new entries to the product catalog, a process that hasn't yet been automated. Consequently, I find myself creating JSON documents for the MongoDB database.

Products such as boards, sails, fins, and foils possess diverse specifications that vary depending on their type. Extracting these values from official product websites can be laborious, particularly when field names differ across brands, as illustrated by the example of two sails from different manufacturers:



In the accompanying video, I demonstrate how I leverage Copilot Chat to extract data from copied website content. By providing a simple prompt outlining the array-to-JSON attribute mapping, I swiftly convert the data:

This approach streamlines the addition of new products to my catalog. Looking ahead, I aim to automate this process using a combination of a small script and GenAI programming. However, that's a tale for another time.