https://github.com/miniql/miniql-json-example
An example of using MiniQL to make queries against a set of JSON files.
https://github.com/miniql/miniql-json-example
Last synced: 15 days ago
JSON representation
An example of using MiniQL to make queries against a set of JSON files.
- Host: GitHub
- URL: https://github.com/miniql/miniql-json-example
- Owner: miniql
- Created: 2020-07-27T05:01:09.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-05-30T09:21:30.000Z (about 4 years ago)
- Last Synced: 2025-12-05T23:23:38.561Z (6 months ago)
- Language: JavaScript
- Size: 27.3 KB
- Stars: 0
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# MiniQL - JSON files example
An example of MiniQL - the tiny JSON-based query language inspired by GraphQL.
This example shows how to use [miniql](https://www.npmjs.com/package/miniql) and [@miniql/json](https://www.npmjs.com/package/@miniql/json) to run queries against a set of JSON files.
Example [Star Wars data is courtesy of Kaggle](https://www.kaggle.com/jsphyg/star-wars/data).
You need [Node.js](https://nodejs.org/en/) installed to run this example code.
Any problems? Please log an issue on this repo.
Love this? Please [star the repo](https://github.com/miniql/miniql) and [support my work](https://www.codecapers.com.au/about#support-my-work)
## Repo contents
```
/miniql-json-example
index.js -> Example code that runs various queries against the JSON files.
/data
... -> Various JSON files with data from the Star Wars universe.
```
## Setup
[Download a the zip file of this code](https://github.com/miniql/miniql-json-example/archive/master.zip) or use Git to clone this repository.
Open a terminal, change directory to the repo and install dependencies:
```bash
cd miniql-json-example
npm install
```
## Run the code
Open a terminal, change directory to the repo and run the code using Node.js:
```bash
cd miniql-json-example
npm start
```
A bunch of example queries will run and results are displayed in the terminal.
Please read `index.js` to see each example query.
Don't forget to [star the repo](https://github.com/miniql/miniql) and [follow the developer on Twitter](https://twitter.com/codecapers).