All Projects → gizt → selector

gizt / selector

Licence: other
JSON Selector - fast and easy to use JSON selector

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to selector

Resq
React Element Selector Query (RESQ) - Query React components and children by component name or HTML selector
Stars: ✭ 89 (+20.27%)
Mutual labels:  query, selector
Dasel
Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.
Stars: ✭ 759 (+925.68%)
Mutual labels:  query, selector
chartjs-plugin-datasource-prometheus
Chart.js plugin for Prometheus data loading
Stars: ✭ 77 (+4.05%)
Mutual labels:  query
hasura-sdk
Hasura Schema & Metadata Typescript SDK
Stars: ✭ 21 (-71.62%)
Mutual labels:  query
aarbac
An Automated Role Based Access Control .NET framework with T-SQL Query Parser which automatically parse select, insert, update, delete queries based on the logged in user role
Stars: ✭ 18 (-75.68%)
Mutual labels:  query
service-fabric-queryable
Enable query support for your stateful services in Service Fabric via the OData protocol.
Stars: ✭ 42 (-43.24%)
Mutual labels:  query
node-reactive-postgres
Reactive queries for PostgreSQL
Stars: ✭ 28 (-62.16%)
Mutual labels:  query
rx-query
timdeschryver.github.io/rx-query/
Stars: ✭ 195 (+163.51%)
Mutual labels:  query
cacheable-lookup
A cacheable dns.lookup(…) that respects TTL 🎉
Stars: ✭ 121 (+63.51%)
Mutual labels:  query
graph-client
light zero dependency graphql-client, supporting cache and SSR
Stars: ✭ 27 (-63.51%)
Mutual labels:  query
activerecord-setops
Union, Intersect, and Difference set operations for ActiveRecord (also, SQL's UnionAll).
Stars: ✭ 21 (-71.62%)
Mutual labels:  query
dnstrace
Yet another DNS query tracing/analysis tool written in Go
Stars: ✭ 35 (-52.7%)
Mutual labels:  query
LDflex-Comunica
Comunica query engine support for the LDflex language
Stars: ✭ 15 (-79.73%)
Mutual labels:  query
tag-picker
Better tags input interaction with JavaScript.
Stars: ✭ 27 (-63.51%)
Mutual labels:  query
querqy-elasticsearch
Querqy for Elasticsearch
Stars: ✭ 37 (-50%)
Mutual labels:  query
storybook-graphql-kit
Write GraphQL queries and pass response data to your components
Stars: ✭ 19 (-74.32%)
Mutual labels:  query
react-dom-inject
Binds an HTML element by selector to a ReactElement and renders to a DOM tree (with redux injection)
Stars: ✭ 18 (-75.68%)
Mutual labels:  selector
SKChoosePopView
SKChoosePopView是一个HUD风格的可定制化选项弹窗的快速解决方案,集成了上、下、左、右、中5个进场方向的6种动画效果,如果不能满足你对酷炫效果的需要,SKChoosePopView同样支持自定义动画,以及选择记录、动画的开闭、点击特效、行列数量控制等
Stars: ✭ 70 (-5.41%)
Mutual labels:  selector
Gridify
Easy and optimized way to apply Filtering, Sorting, and Pagination using text-based data.
Stars: ✭ 372 (+402.7%)
Mutual labels:  query
querydumper
Laravel package to dump all running queries on the page.
Stars: ✭ 24 (-67.57%)
Mutual labels:  query

@gizt/selector - Fast & Simple JSON Selector

Node CI

@gizt/selector is a fast and intuitive JSON selector (the syntax is based on JSON notation and glob).

You can try it online here playground

Quick start

npm install @gizt/selector

Usage

// es6/browser
import select from '@gizt/selector'

// node
const select = require('@gizt/selector')

Example

let data = {
  "title": "Awesome",
  "users": [
    { "name": "John", "family": "Doe", "friends": [{ "name": "F1" }] },
    { "name": "Joe",  "family": "Dae", "friends": [{ "name": "F2" }] }
    ...
  ]
}

Selectors

Simple selector

Simple property/name selector

// Property selector
select('users[].name', data) // ['John', 'Joe', ...]

// Nested array
select('users[].friends[].name', data) // ['F1', 'F2']

Wildcard selector

Support prefix, suffix, middle and star

// prefix
select('users[].na*', data)  // ['John', 'Joe']

// suffix
select('users[].*ly', data)  // ['Doe', 'Dae']

// middle
select('users[].*am*', data) // ['John', 'Doe', 'Joe', 'Dae']

// star
select('users[].friends[].*', data) // ['F1', 'F2']

Array selector

Array index & slice

// index
select('users[1].name', data) // 'Joe'

// all elements start from index `1` same as `data.slice(1)`
select('users[1:].name', data) // ['Joe', 'Ja', ...]

// first 2 elements same a `data.slice(0, 2)`
select('users[:2].name', data) // ['John', 'Joe']

Array input

Also support array input

select('[].name', [ { name: 'a'}, { name: 'b' } ]) // ['a', 'b']

For more example, please see test directory

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].