Getting JSON data with PowerShell
While we often work with tabular data, there are many times we’re faced with JSON data.
JSON, short for JavaScript Object Notation, is a relatively concise way of representing objects as strings. Over the past few decades, we’ve seen JSON data become more popular than traditional more structured data structures, such as XML. In fact, JSON is so popular that when I work with external APIs, I find that JSON is the most common format they send back.
If you’ve not seen JSON before, the following is a sample JSON response provided by the ICanHazDadJoke.com website, a meme site designed to provide random “dad jokes” to visitors.
Here’s a sample dad joke in the JSON format provided by the website:
{ "id": "D5wAA5o4TCd", "joke": "What do you call a careful wolf? Aware wolf.", "status": 200 }
This JSON object has three...