1.1.2 • Published 6 years ago

json-object-query v1.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

JSON Query

Simple JSON property finder with ORM-like syntax, only for static site / simple website with small data. We not recommend for JSON file more than 1MB or recursively JSON with 5 children or more.

Usage

Install it using yarn add json-object-query or npm install json-object-query.

And then, follow this below example.

import Query from 'json-object-query'

const query = new Query('json string')
const result = query
  .select('id, title')
  .sort('id', 'desc')
  .where('id', 10)
  .limit(30)
  .get()

console.log(result)

// [{ title: ..., description: ... }, ...]

API Usage

MethodDescriptionPriortyDefault
selectSelect a fields that will you use1All
where---
limit---
sort---
findOneBy---
whereLike---
whereBetween---
get---

Source File

Thanks to JSON Placeholder for free JSON data that we use for example usage on this library.

License

This project under MIT License

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1-dev

6 years ago

1.0.0-dev

6 years ago