json-querier
v1.0.0
Published
Query JSON data like a pro.
Downloads
1
Maintainers
Readme
json-querier
Easily query your json data and modify it.
Installation
npm install json-querier
Usage
import Query from "json-querier";
const data = [
{
name: "Harry Potter",
city: "London",
},
{
name: "Don Quixote",
city: "Madrid",
},
{
name: "Joan of Arc",
city: "Paris",
},
{
name: "Rosa Park",
city: "Alabama",
},
];
const q = new Query();
q.where("name").equals("Don Quixote").update("Rajaneesh R").save();
// [
// {
// name: 'Rajaneesh R',
// city: 'Madrid',
// '_$old': { name: 'Don Quixote', city: 'Madrid' }
// }
// ]
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.