 So yesterday I was working with this JSON file. It was on a web server for work. For those of you who don't know, my full-time job is a firefighter and it's a JSON file that just has some information about locations and the state of some hydrants in our area. And I copied it to my server so you can go right to this URL to see it yourself. I'm gonna W get it and show it to you. So look at it, it's a JSON file, correct? So I do that and now if I wanted to parse through it normally I would pipe that into JQ, right? So I do that and it didn't quite work. Why not? Well, notice that it starts and ends with a quotation mark and all the other quotation marks are backslash because it's not a JSON object. In this case, it's a string. I don't know, I've come across before some websites do this. Instead of just passing JSON, it passes JSON as a string and then you have to convert it, which is easy to do in a web browser. But how do you do it here in the shell? Well, the first thing I did was I went into VIM, I removed the first and last quotation, then I used SED to turn all these backslash quotations into quotation marks. It worked for this file, but that may not work for all files. And I was wondering, is there a tool that can do that? Well, yes, JQ will do it. JQ, you just said JQ won't work. Well, if I do JQ, watch, I'll show you the file again. This is what the file looks like, right? And then I'm gonna run it again. I'm gonna pipe it into JQ-R dot and when I do that, notice it looks different. We don't have those backslashes with that single quote. So basically it has now turned it into a proper JSON format. And then from there, I can pipe it into JQ again and now it's properly formatted. So basically I just run it through JQ twice, once with the dash R dot option. And then after that, I can go through here and I can do things like, let's see, total. Let's put that in quotation marks. That should give me the output of the total, which is 104 in this particular file. So yeah, I thought you might find that useful because I've come across a few websites who do that. So if you come across a JSON file that is actually in a string format, you can quickly convert it using JQ and then piping into JQ again. Now I don't know if you can do that, just putting it into JQ once without piping it twice, but simple enough this way. Thanks for watching. Filmsbychrist.com, that's Chris at the K. There's a link in the description. And as always, I hope that you have a great day.