WriteFileSync(DATA_FILE, JSON.stringify(data, null, 2)) Import from 'lodash-es'Ĭonst AUTH_TOKEN = '*********************'Ĭonst DATA_FILE = 'data/unece_country_overview.json'Ĭonst OUTPUT_FILE = 'output/netherlands.json' At the moment of writing you can switch to JMESPath if you prefer that, and support for other querying languages may follow. Therefore, the editor allows you to select other querying languages too. What querying language you prefer can be personal taste or bound to what you use in other places of your development environment. So that’s what I implemented for the editor. How do I count the number of unique occurrences of a value using JMESPath for example? I wanted more freedom, and as a web developer, just being able to use JavaScript in combination with Lodash gives me all the flexibility I need to write the query I need in just a few lines. Also, I found most of the querying languages limiting in one way or another. I’ve been working a lot with large amounts of JSON data, and therefore I’ve built an editor which can smoothly handle JSON documents up to 500 MB. The difficulty I have with for example command line tools is that I didn’t use them enough to be able to learn and remember their syntax, so every time I did use them I had to do quite some googling and trial and error to figure out the right way to describe what I wanted to query.įor me, a visual editor where I can build a query and directly see a preview of the result saves me a lot of time (and frustration), so that’s what I created. Both of these categories are discussed in the following sections. ![]() ![]() In the following example, the data set UNECE’s Country Overview is loaded in the editor, and we’re filtering on the country “Netherlands”, sorting by year, and then picking the fields we’re interested in from the data:īefore I developed this Transform modal to query your data, I mostly used command line tools or MongoDB to query my JSON data. With JSON Editor Online, you can use the Transform wizard to create a query on your data. JSON Editor Online offers that too, but also comes with powerful solutions for querying, transforming, comparing, and repairing your data. You can use them as a JSON viewer or JSON formatter. ![]() Most editors offer basic editing and formatting of JSON data. I mention JSON Editor Online here because this is the web application that I developed myself to – in the first place – serve my own needs, working as a developer with JSON data on a day to day basis for many years. ![]() There are quite some online JSON editors, so just pick your favorite. To do that, you can copy and paste the JSON data in an online JSON editor like JSON Editor Online. But whilst developing, you often have to do some processing on the data, like sorting and filtering some items from a received list. With these applications you can view your data. And when purely working on a backend you are probably using a REST client like Postman or Insomnia to fetch data. In the frontend, you can see the JSON data that you received using Developer Tools. That can be as a frontend or backend developer. Perfect for: inspecting, formatting, and querying JSON data on the fly.Īs a developer you are often dealing with JSON data coming from a backend.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |