# jsonloc

> JSONLoc ==================

Latest version **1.0.0** (published 2016-03-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install jsonloc
pnpm add jsonloc
yarn add jsonloc
bun add jsonloc
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-03-26 |
| First published | 2016-03-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Maurits Lawende |
| Maintainers | mauritsl |
| Keywords | json, location, path, manipulation |

## Links

- npm: https://www.npmjs.com/package/jsonloc
- Repository: https://github.com/mauritsl/node-jsonloc
- Issues: https://github.com/mauritsl/node-jsonloc/issues
- npm.io page: https://npm.io/package/jsonloc

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-03-26

## README

JSONLoc
==================

Manipulate JSON/JavaScript objects using simple location queries.

## Installation

Install using ``npm install jsonloc``

## Quick example

```javascript
var JsonLoc = require('jsonloc');
var object = {
  users: [{
    name: 'Alice',
    age: 28
  }, {
    name: 'Bob',
    age: 29
  }]
};

object = JsonLoc.set(object, 'names', []);
object = JsonLoc.set(object, 'names[]', JsonLoc.get(object, 'users[0].name'));
object = JsonLoc.set(object, 'names[]', JsonLoc.get(object, 'users[last].name'));
object = JsonLoc.del(object, 'users');

console.log(object);
// { names: [ 'Alice', 'Bob' ] }
```

---
_Source: https://npm.io/package/jsonloc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
