Skip to content

Latest commit

 

History

History
50 lines (44 loc) · 885 Bytes

README.md

File metadata and controls

50 lines (44 loc) · 885 Bytes

Installation

npm install json-daex

About

This project is currently in very early stage. Please feel free to share any idea to make this package better.

Documentation

Usage Example:

var daex = require('json-daex')
var obj = [
  {
    name: 'abc',
    type: 'array',
    age: 20
  },
  {
    name: 'pqr',
    type: 'string',
    age: 20
  },
  {
    name: 'xyz',
    type: 'array',
    age: 22
  },
  {
    name: 'ghi',
    type: 'array',
    age: 20
  },
  {
    name: 'mno',
    type: 'number',
    age: 20
  }
]

var result = daex.indexAll(obj,{'type':'array'})
console.log(result)
//get index of all objects with type: array
// Output: [ 0, 2, 3 ]