thisdaveJ

Using jq and curl to Wrangle JSON Arrays from the Terminal

In this tutorial, we use jq and curl to query a web service and retrieve JSON objects containing embedded arrays. We then invoke a command based on each element in the array rather than simply printing the values to the console. A special thanks to one of my readers, B. Anderson, who left a comment on my Consuming Web API JSON Data Using curl and jq post and provided this question for us to explore. Let’s get started!

Share
Count array items in JavaScript

How to Count Unique Items in JavaScript Arrays

The fish 🐟 in our home aquarium aren’t very communicative. I don’t necessarily need them to communicate their deepest emotions, but it would be helpful if they would at least tell me when they are hungry. Believe it or not, they don’t. Alas, when I peer inside the aquarium, I don’t know if they are hungry or if someone else in the family has already fed them breakfast🍩 or dinner🍕. IoT to the rescue! I am in the process of creating a system that enables our family to log when the fish have been fed. The feeding times can be logged by pressing a push-button on a circuit board connected Read More

Share

Do I Need an Umbrella Today? Google Sheets and JavaScript to the Rescue!

OK, Google Sheets! Send me an email if I need an umbrella today. Send an email using Google Sheets? Yes, that’s right! Sheets can do a lot more than add numbers and calculate your mortgage payments. In our last article, we learned how to consume JSON web data using Google Sheets and we built templates to display and sort weather forecast data. Today, we’ll build on what we covered last time and learn how to send email using Google Sheets based on the JSON data we retrieve. Let’s get practical and build something useful while we’re at it. Have you ever found yourself outside somewhere and it starts to rain Read More

Share

Consuming JSON Web Data Using Google Sheets

Note: This article has been superseded with Fetching, Filtering, and Sorting JSON APIs in Google Sheets: The Missing Functions which provides a set of Google Sheets functions with additional capabilities. I’ve said it before, and I’ll say it again.  JSON has become the lingua franca for exchanging data on the web, and we (as developers) need to know how to process JSON data received from RESTful web services so we can be positioned for the present and for the future. My article on Consuming Node.js Microservices Created with stdlib provided a high-level tour covering several methods of parsing and processing JSON data. Last time, we focused on how to consume Read More

Share