Unfortunately, shells such as Bash can't interpret and work with JSON directly. One common use case is to be able to see unique occurrences of a particular value within an array or remove duplicates. Let's see how many unique colors we have in our fruits JSON document
JSON data is used pretty frequently on the web if you're hitting APIs. This not only includes external data (twitter, weather, marvel database), but often includes internal data to your company. It's nice to be able to leverage data from anywhere, and it can be frustrating for people to try to parse JSON data. Luckily, we have this all ...
Apr 26, 2020 · The underscores help to differentiate the comment from the rest of the data in our file. A Word of Caution. There’s an important detail to keep in mind. The comments we added to our JSON file are included in the JSON object. In other words, the comments are treated as data. Here’s what we mean. This is the code in our file, data.json: